feat(html): relax block id parsing
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-04 00:57:06 +00:00
parent d12408ffb9
commit 2e8886bbd7
2 changed files with 2 additions and 5 deletions

View file

@ -18,9 +18,6 @@ func ParseBlockID(id string) []byte {
if len(part) != 1 {
return nil
}
if _, ok := slotRegistry[part[0]]; !ok {
return nil
}
slots = append(slots, part[0])
} else {
if part == "" {

View file

@ -178,12 +178,12 @@ func TestParseBlockID(t *testing.T) {
{"C-0-C-1", []byte{'C', 'C'}},
{"H-0", []byte{'H'}},
{"C-0-C-0-C-0", []byte{'C', 'C', 'C'}},
{"X-0", []byte{'X'}},
{"H-0-X-0", []byte{'H', 'X'}},
{"", nil},
{"L-1-C-0", []byte{'L', 'C'}},
{"L-0-C", nil},
{"LL-0", nil},
{"X-0", nil},
{"H-0-X-0", nil},
}
for _, tt := range tests {