Fix false positives for selector-descendant-combinator-no-non-space #3508
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.
fixes #3449
This rule is a little bit strange in that a descendent combinator is always whitespace, it's just not always a single space. In fact the logic of the rule checks that the combinator is not one of the standard "non-space" combinators (+, >) and passes if that is the case.
For this particular bug, PostCSS apparently determined that
+($column - 1)
is a combinator, which is odd, and it is not a non-space combinator nor is it a single space.Anyway, since what are really looking is whitespace combinators that are not single spaces, I changed the logic to do that instead. It's a bit of a work-around but it covers the case in question and most importantly does not regress.