Originally reported at lesshint/lesshint#487
- Node Version:
10.8.0
- NPM Version: ``
- postcss-less Version:
2.0.0
If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
LESS
JavaScript
const postcss = require('postcss');
const syntax = require('postcss-less');
const lessText = `@var: '
foo
bar
';`;
postcss([])
.process(lessText, { syntax: syntax })
.then(function (result) {
console.log(result.root.first)
});
Expected Behavior
An AST similar to this:
{
...
source: {
start: { line: 1, column: 1 },
end: { line: 4, column: 2 }
}
}
Actual Behavior
An AST looking like this (note the end line):
{
...
source: {
start: { line: 1, column: 1 },
end: { line: 1, column: 18 }
}
}
How can we reproduce the behavior?
Run the JS example above.
The original issue used a tilde-escaped string but I've managed to reproduce it with any multiline variable. I'm not really sure how to solve it, but I'll continue to think about it.
Originally reported at lesshint/lesshint#487
10.8.02.0.0If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
LESS
JavaScript
Expected Behavior
An AST similar to this:
Actual Behavior
An AST looking like this (note the
endline):How can we reproduce the behavior?
Run the JS example above.
The original issue used a tilde-escaped string but I've managed to reproduce it with any multiline variable. I'm not really sure how to solve it, but I'll continue to think about it.