From 5fe02b870b64f7944801a9328f33a39e2c971941 Mon Sep 17 00:00:00 2001 From: Josh Pike Date: Mon, 16 Apr 2018 12:08:00 +0700 Subject: [PATCH] fixed compatibility issues with node <=5 --- lib/colors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/colors.js b/lib/colors.js index 43f83ab..13b0085 100644 --- a/lib/colors.js +++ b/lib/colors.js @@ -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;