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

css selector walk wrong index when filtering ast types #44

Closed
idoros opened this issue Aug 4, 2021 · 0 comments · Fixed by #46
Closed

css selector walk wrong index when filtering ast types #44

idoros opened this issue Aug 4, 2021 · 0 comments · Fixed by #46
Labels
bug Something isn't working css-selector-parser

Comments

@idoros
Copy link
Collaborator

idoros commented Aug 4, 2021

walk(parseCssSelector(`.a:hover.b`), (node, index) => {
   // first call:   node=a, index=0
   // second call:  node=b, index=1 <-- should be 2
}, { visitList: [`class`]});

without visitList/ignoreList index is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working css-selector-parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant