Use unicode escape sequences instead of octal
The latter is illegal in strict mode.
This commit is contained in:
parent
4cfdc57712
commit
c7bc4cacde
@ -162,8 +162,8 @@ function stylizeWithColor(str, styleType) {
|
|||||||
var style = styles[styleType];
|
var style = styles[styleType];
|
||||||
|
|
||||||
if (style) {
|
if (style) {
|
||||||
return '\033[' + colors[style][0] + 'm' + str +
|
return '\u001b[' + colors[style][0] + 'm' + str +
|
||||||
'\033[' + colors[style][1] + 'm';
|
'\u001b[' + colors[style][1] + 'm';
|
||||||
} else {
|
} else {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user