andybalholm / cascadia

CSS selector library in Go
BSD 2-Clause "Simplified" License
703 stars 65 forks source link

cascadia fails on multiple attribute selector #24

Closed suntong closed 7 years ago

suntong commented 7 years ago

The multiple CSS attribute selectors like input[name=Sex][value=M] are valid selectors (for htmls like <input type="radio" name="Sex" value="F" /> etc), as per this and this, however cascadia are failing on them:

panic: expected identifier, found 1 instead

goroutine 1 [running]:
panic(0x749a80, 0xc420075ec0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/andybalholm/cascadia.MustCompile(0x7ffe2d3262ea, 0x1b, 0x0)
        /export/repo/go-arch/src/github.com/andybalholm/cascadia/selector.go:59 +0x7e
...

Would you double-check please? Thx.

suntong commented 7 years ago

Not true.

Close it now until I can figure it out exactly what happened...