Skip to content

Conversation

rhorber
Copy link
Contributor

@rhorber rhorber commented Oct 6, 2019

Remove comments from class names, before searching for @media and checking for duplicates.

This closes #2638.
The fix of #1657 is still in place.

Remove comments from class names,
before searching for @media and checking for duplicates.
@gsherwood gsherwood added this to the 3.5.2 milestone Oct 9, 2019
@gsherwood
Copy link
Member

The test cases in this PR pass without any modification to the sniff itself, so they are not replicating the problem that the PR aims to solve. I will take a look into them a bit more and see if I can figure out what's going on.

@gsherwood
Copy link
Member

Ah, I see what went wrong. The comments in the test file are all the same, so they always look like they match. I will change them to ensure the current code sees them as different classes.

gsherwood added a commit that referenced this pull request Oct 30, 2019
@gsherwood gsherwood merged commit 32d11c7 into squizlabs:master Oct 30, 2019
@gsherwood
Copy link
Member

Thanks for the PR. Fix worked well after the tests were changed.

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

Successfully merging this pull request may close these issues.

Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name
2 participants