-
Notifications
You must be signed in to change notification settings - Fork 389
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
Selector regex fix #130
base: master
Are you sure you want to change the base?
Selector regex fix #130
Conversation
Original regex did not cover all valid class selectors. The new one does - it adds support for integers, capital letters, underscores and dashes.
OK, I've added a commit that fixes that problem. Unfortunately, this breaks one of the existing tests. I'm afraid I don't have the time to hunt down this bug as well. I suspect that with the new regexp, the "join" glue is captured (which probably suggests that there might be more false positives). |
Is this still active? Escaped selectors still aren't being removed even when unused. |
Would love to see this merged! |
This fix solves the following:
Note: I didn't do negative testing, so these changes might mean that some other errant selector passes the new regex pattern and gets included when it shouldn't. But I don't think that likely.
EDIT: Hmm, apparently it now allows certain selectors when it shouldn't. Gonna fix that and reopen the PR after I make the changes.