mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
a little clearer ParseError output
This commit is contained in:
@@ -173,7 +173,8 @@ less.parser = {
|
||||
line = (input.slice(0, i).match(/\n/g) || "").length + 1;
|
||||
end = input.slice(i).indexOf('\n') + i;
|
||||
zone = stylize(input.slice(start, i), 'green') +
|
||||
stylize(input.slice(i, end), 'yellow') + '\033[0m\n';
|
||||
stylize(stylize(input[i], 'inverse') +
|
||||
input.slice(i + 1, end),'yellow') + '\033[0m\n';
|
||||
|
||||
this.error = { name: "ParseError", message: "Parse Error on line " + line + ":\n" + zone };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user