You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
// comments in SASS selectors break formatting. #3647
lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!
// This is SCSS. Prettier moves `.bar` up to the the same line as 'Comment.'..foo,
// Comment..bar {
display: block;
}
Output:
// This is SCSS. Prettier moves `.bar` up to the the same line as 'Comment.'..foo,
// Comment. .bar {
display: block;
}
Expected behavior:
When running prettier on this code inside of Atom, it bumps .bar up to the comment line. It should keep it on a separate line. This completely breaks the file.
example updated by @j-f1 to use the correct parser
lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!
Activity
vjeux commentedon Jan 5, 2018
The parser doesn't consider it a comment and parses it as a lot of garbage :(
[scss] Print comments inside of selector as is
vjeux commentedon Jan 5, 2018
Let's not pretend that the selector parser handles comments and print the selector as is when there are comments: #3649
[scss] Print comments inside of selector as is
[scss] Print comments inside of selector as is
[scss] Print comments inside of selector as is (#3649)
ryanpcmcquen commentedon Jan 5, 2018
Thanks for the quick work!
azz commentedon Jan 5, 2018
Also closing #2468 (duplicate)
ekfuhrmann commentedon Mar 1, 2018
I'm still having issues with this, even after updating to v1.11. I have the following color map:
Input
Output
As you can see, the comment is getting merged into the actual color map.
alexander-akait commentedon Mar 1, 2018
@eablokker already wip, bug in parser
alexander-akait commentedon Mar 1, 2018
But we should add tests when list inside maps 👍
j-f1 commentedon Mar 1, 2018
That’s a different issue; see #4074.
[-]`//` comments in SASS break formatting.[/-][+]`//` comments in SASS selectors break formatting.[/+]ekfuhrmann commentedon Mar 1, 2018
Thanks @evilebottnawi and @j-f1 for forwarding it on
lukaszewczak commentedon Jun 12, 2018
Hi, unfortunelty, this issue is still active. I'm using version
1.13.5on Windows,For my input
I got output: