Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nesting selectors like & > button cannot be parsed #77

Open
OrKoN opened this issue Jun 14, 2024 · 4 comments
Open

Nesting selectors like & > button cannot be parsed #77

OrKoN opened this issue Jun 14, 2024 · 4 comments

Comments

@OrKoN
Copy link

OrKoN commented Jun 14, 2024

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
Copy link
Author

OrKoN commented Jun 14, 2024

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.

@OrKoN OrKoN closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@LeaVerou LeaVerou reopened this Jun 14, 2024
@LeaVerou
Copy link
Owner

Why did you close this? Supporting nesting selectors is a legit issue!

@OrKoN
Copy link
Author

OrKoN commented Jun 14, 2024

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
Copy link
Owner

Yes, it definitely should be!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants