Permalink
Browse files

accept '\e[m' as an ending token to accommodate output of certain ter…

…mcolors.js
  • Loading branch information...
1 parent 558055d commit 4780538139805c15aa83710b280ab9aaf40136b8 @jjclark1982 jjclark1982 committed Feb 22, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/ansispan.js
View
@@ -24,6 +24,7 @@ var ansispan = function (str) {
//
str = str.replace(/\033\[3m/g, '<i>').replace(/\033\[23m/g, '</i>');
+ str = str.replace(/\033\[m/g, '</span>');
return str.replace(/\033\[39m/g, '</span>');
};

0 comments on commit 4780538

Please sign in to comment.