mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-29 11:00:11 +00:00
fixed compatibility issues with node <=5
This commit is contained in:
parent
01bb5cf845
commit
5fe02b870b
@ -110,7 +110,7 @@ function applyStyle() {
|
||||
while (i--) {
|
||||
var code = ansiStyles[nestedStyles[i]];
|
||||
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
||||
str = str.replace(new RegExp(/[\r\n]+/, 'g'), code.close + '\n' + code.open);
|
||||
str = str.replace(new RegExp(/[\r\n]+/g), code.close + '\n' + code.open);
|
||||
}
|
||||
|
||||
return str;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user