mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Fixed line/column numbers in math expr/ops error messages. Updated tests.
This commit is contained in:
@@ -42,6 +42,12 @@ tree.Rule.prototype = {
|
||||
this.merge,
|
||||
this.index, this.currentFileInfo, this.inline);
|
||||
}
|
||||
catch(e) {
|
||||
if (e.index === undefined) {
|
||||
e.index = this.index;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
if (strictMathBypass) {
|
||||
env.strictMath = false;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line null, column 0:
|
||||
1 error: (1px + 3em);
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line 2, column 3:
|
||||
1 .a {
|
||||
2 error: (1px + 3em);
|
||||
3 }
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in {path}add-mixed-units2.less on line null, column 0:
|
||||
1 error: ((1px * 2px) + (3em * 3px));
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in {path}add-mixed-units2.less on line 2, column 3:
|
||||
1 .a {
|
||||
2 error: ((1px * 2px) + (3em * 3px));
|
||||
3 }
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
OperationError: Can't substract or divide a color from a number in {path}color-operation-error.less on line null, column 0:
|
||||
1 prop: (3 / #fff);
|
||||
OperationError: Can't substract or divide a color from a number in {path}color-operation-error.less on line 2, column 3:
|
||||
1 .a {
|
||||
2 prop: (3 / #fff);
|
||||
3 }
|
||||
|
||||
Reference in New Issue
Block a user