-
Notifications
You must be signed in to change notification settings - Fork 360
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
Parse silent comments in _interpolatedDeclarationValue()
#2266
Conversation
280de8c
to
18cd524
Compare
@@ -133,7 +133,8 @@ class Parser { | |||
whitespace(); | |||
} | |||
|
|||
/// Consumes and ignores a silent (Sass-style) comment. | |||
/// Consumes and ignores a single silent (Sass-style) comment, not including | |||
/// the trailing newline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"not including the trailing newline" makes me wonder about what happens when there are consecutive lines with silent comments, but otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function will only consume one of them, but whitespace()
will consume them all and the whitespace.
wroteNewline = false; | ||
} | ||
|
||
case $slash when silentComments && scanner.peekChar(1) == $slash: | ||
buffer.write(rawText(loudComment)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this really parse a loud comment when finding //
? Or is this dead code because of going through the previous case all the time ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right that it's incorrect and also that it's dead code. I'll send out a PR to remove it.
Closes #2263
See sass/sass-spec#2000