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

Fix false positives for at-charset and single quotes in string-quotes #2788 #2902

Merged
merged 7 commits into from
Sep 22, 2017

Conversation

CAYdenberg
Copy link
Contributor

@CAYdenberg CAYdenberg commented Sep 17, 2017

Which issue, if any, is this issue related to?

#2788

Is there anything in the PR that needs further explanation?

No, self-explanatory

@CAYdenberg CAYdenberg changed the title WIP: Fix false positives for at-charset and single quotes in string-quotes #2788 Fix false positives for at-charset and single quotes in string-quotes #2788 Sep 17, 2017
@@ -10,6 +10,8 @@ a[id="foo"] { content: "x"; }

Quotes within comments are ignored.

Also, the quotes in a `charset` @-rule are ignored as using single quotes in this context is incorrect according the [CSS specification](https://www.w3.org/TR/CSS2/syndata.html#x57).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this line to below the quotes in comments code underneath this sentence

Update the verbiage to Single quotes in a charset @-rule are ignored as using single quotes in this context is incorrect according the CSS specification.

Maybe see what adding a code example for this also looks like, it might look weird or add confusion 🤔

},
{
code: '@charset "utf-8"',
description: "ignore @charset rules"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this same test to the "double quotes" test around line #119 as a safe guard of sorts please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added below ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, though you added it to the SCSS tests at lines 160-163, which won't hurt either, can you add it after line 118 please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Yes added there.

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@jeddy3 jeddy3 merged commit ebddd94 into master Sep 22, 2017
@jeddy3 jeddy3 deleted the bug-2788 branch September 22, 2017 08:39
@jeddy3
Copy link
Member

jeddy3 commented Sep 22, 2017

  • Fixed: string-quotes false positives for @charset and single quotes (#2902).

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

Successfully merging this pull request may close these issues.

3 participants