Originally reported at lesshint/lesshint#490
- Node Version:
10.9.0
- NPM Version:
6.2.0
- 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 = `.foo{.bar("baz")}`;
postcss([])
.process(lessText, { syntax: syntax })
.then(function (result) {
console.log(result.root.first)
})
.catch((e) => {
console.error(e);
});
Errors
CssSyntaxError {
name: 'CssSyntaxError',
reason: 'Unknown word',
source: '\n.foo{.bar("baz")}\n',
line: 2,
column: 16,
message: '<css input>:2:16: Unknown word',
input: { line: 2, column: 16, source: '\n.foo{.bar("baz")}\n' }
}
Expected Behavior
Return an AST without any errors.
Actual Behavior
The above error is thrown. Adding a semicolon before } fixes it though.
How can we reproduce the behavior?
Run the JS code above.
Originally reported at lesshint/lesshint#490
10.9.06.2.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
Errors
Expected Behavior
Return an AST without any errors.
Actual Behavior
The above error is thrown. Adding a semicolon before
}fixes it though.How can we reproduce the behavior?
Run the JS code above.