This repository was archived by the owner on Jun 6, 2022. It is now read-only.
Ensure escaped colons do not break selector transformations#11
Merged
jonathantneal merged 3 commits intocsstools:masterfrom Sep 18, 2018
Merged
Conversation
Contributor
|
This looks good. @Semigradsky, any hesitation in pulling this in, or may I? I would accept this as-is right now, and then later switch to postcss-selector-parser if possible. |
Contributor
|
I think this is now resolved in the latest version of the postcss-selector-parser. |
The regex is set up to ensure that escaped colons are not considered when looking for :not. This slows down selector transformation by about 25%
This provides a pretty decent speedup. Overall selector matching is now slight slower by about 6% instead of 25%.
Contributor
Author
|
It does not appear so. I ran the tests against the master branch and still get failures. |
fc8ebc4 to
78c7706
Compare
This was referenced Oct 26, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, escaped colons are not considered in selector transformations and so a statement like this:
.sm\:not-italic { font-style: normal; }will error out because it contains a:notin it and this confused the selector parsing code.Fixes #10
cc @adamwathan