Merge pull request #38 from CartoDB/use-hexa-instead-octal

Use hexadecimal values instead octal
This commit is contained in:
IagoLast 2017-08-01 11:04:01 +02:00 committed by GitHub
commit 66cc146a02

View File

@ -53,7 +53,7 @@ var carto = {
if (typeof(extract[2]) === 'string') { if (typeof(extract[2]) === 'string') {
error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey')); error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey'));
} }
error = options.indent + error.join('\n' + options.indent) + '\033[0m\n'; error = options.indent + error.join('\n' + options.indent) + '\x1B[0m\n';
message = options.indent + message + stylize(ctx.message, 'red'); message = options.indent + message + stylize(ctx.message, 'red');
if (ctx.filename) (message += stylize(' in ', 'red') + ctx.filename); if (ctx.filename) (message += stylize(' in ', 'red') + ctx.filename);
@ -111,6 +111,6 @@ function stylize(str, style) {
'red' : [31, 39], 'red' : [31, 39],
'grey' : [90, 39] 'grey' : [90, 39]
}; };
return '\033[' + styles[style][0] + 'm' + str + return '\x1B[' + styles[style][0] + 'm' + str +
'\033[' + styles[style][1] + 'm'; '\x1B[' + styles[style][1] + 'm';
} }