We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 569a9bb commit f695a04Copy full SHA for f695a04
src/parser/index.js
@@ -21,13 +21,12 @@ module.exports = async css => {
21
return Promise.resolve(processNodes(rootNode))
22
} catch (error) {
23
const {line, column, reason} = error
24
+ const message = error.showSourceCode
25
+ ? `${reason} at line ${line}, column ${column}:\n\n${error.showSourceCode(
26
+ false
27
+ )}`
28
+ : `${reason} at line ${line}, column ${column}:\n\n${error.source}`
29
- return Promise.reject(
- new SyntaxError(
- `${reason} at line ${line}, column ${column}:\n\n${error.showSourceCode(
- false
- )}`
30
- )
31
+ return Promise.reject(new SyntaxError(message))
32
}
33
0 commit comments