mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
normalize quotes to apostrophes in error messages from javascript evaluation (unify node/rhino error message)
This commit is contained in:
@@ -36,7 +36,7 @@ tree.JavaScript.prototype = {
|
||||
try {
|
||||
result = expression.call(context);
|
||||
} catch (e) {
|
||||
throw { message: "JavaScript evaluation error: '" + e.name + ': ' + e.message + "'" ,
|
||||
throw { message: "JavaScript evaluation error: '" + e.name + ': ' + e.message.replace(/["]/g, "'") + "'" ,
|
||||
index: this.index };
|
||||
}
|
||||
if (typeof(result) === 'string') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method "toJS" of undefined' in {path}javascript-error.less on line 2, column 27:
|
||||
SyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method 'toJS' of undefined' in {path}javascript-error.less on line 2, column 27:
|
||||
1 .scope {
|
||||
2 var: `this.foo.toJS()`;
|
||||
3 }
|
||||
|
||||
Reference in New Issue
Block a user