Remove trailing ANSI escape sequences in no-color mode

Added a 'reset' code to the stylize function and changed the previously
hard-coded ANSI escape sequence string to a function call.
This commit is contained in:
Matt
2012-05-27 20:28:42 +12:00
committed by Luke Page
parent 0d9de3a5b1
commit 3be05a1c7b
2 changed files with 3 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ function toCSS(path, callback) {
// Stylize a string
function stylize(str, style) {
var styles = {
'reset' : [0, 0],
'bold' : [1, 22],
'inverse' : [7, 27],
'underline' : [4, 24],