mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
add tests and fix log to console feature
This commit is contained in:
@@ -523,12 +523,11 @@ function removeErrorConsole(path) {
|
||||
}
|
||||
|
||||
function errorConsole(e, rootHref) {
|
||||
var template = '{line}\n{content}';
|
||||
var template = '{line} {content}';
|
||||
var filename = e.filename || rootHref;
|
||||
var filenameNoPath = filename.match(/([^\/]+(\?.*)?)$/)[1];
|
||||
|
||||
content = (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
|
||||
"'" + filename + "'";
|
||||
var errors = [];
|
||||
var content = (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
|
||||
" in " + filename + " ";
|
||||
|
||||
var errorline = function (e, i, classname) {
|
||||
if (e.extract[i] !== undefined) {
|
||||
@@ -547,7 +546,7 @@ function errorConsole(e, rootHref) {
|
||||
} else if (e.stack) {
|
||||
content += e.stack;
|
||||
}
|
||||
log(content);
|
||||
console.log(content);
|
||||
}
|
||||
|
||||
function errorHTML(e, rootHref) {
|
||||
|
||||
Reference in New Issue
Block a user