feat(html): relax block id parsing
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d12408ffb9
commit
2e8886bbd7
2 changed files with 2 additions and 5 deletions
3
path.go
3
path.go
|
|
@ -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 == "" {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue