Inline comment inside selector outputs invalid selector
Causing some downstream errors in stylelint: https://github.com/stylelint/stylelint/issues/4049 . I observed these errors in my repo when trying to update stylelint from 9.6.0 to 12.0.1 .
- Node Version: 13.5.0
- NPM Version: Unk; using RunKit
- postcss Version: 7.0.26
- postcss-less Version: 3.1.4
LESS
// comment1
.a, .b,
// comment2
.c {}
JavaScript
const { parse } = require("postcss-less");
const less = `
// comment1
.a, .b,
// comment2
.c {}`;
const result = parse(less);
console.log(result);
Expected Behavior
comment2 should have its own Comment node and (probably?) not be inside the selector's string.
Actual Behavior
comment2 appears inside the selector string: selector: ".a, .b,\n// comment2\n.c"
How can we reproduce the behavior?
Run it here: https://runkit.com/embed/euxbhhlhqu1l
Happy to review a PR to resolve this.
would this be ever fixed then? A year passed
@xboy2012 the "PR Welcome" tag means it requires community contribution for resolution. I'd you'd like to see this fixed, please open a pull request.
It seem like work well in postcss-less v5