Nesting selectors like `& > button` cannot be parsed
OrKoN opened this issue · 4 comments
OrKoN commented
Example: https://parsel.verou.me/?selector=%26+%3E+button
The reported error is:
Error: Unexpected sequence & found at index 0
at tokenizeBy (parsel.js:97:23)
at Module.tokenize (parsel.js:140:20)
at tryout.oninput (VM9:17:45)
OrKoN commented
I had to read the documentation till the end before posting. It looks like I should extend the tokens list to add the support for nesting selectors.
LeaVerou commented
Why did you close this? Supporting nesting selectors is a legit issue!
OrKoN commented
I found that there is an example under Extensibility section: https://parsel.verou.me/?selector=%23foo+%3E+.bar+%2B+div.k1.k2+%5Bid%3D%27baz%27%5D%3Ahello%282%29%3Anot%28%3Awhere%28%23yolo%29%29%3A%3Abefore#:~:text=in%20the%20console!-,Extensibility,-You%20can%20import
but if it could be supported out of the box, it'd be great.
LeaVerou commented
Yes, it definitely should be!