##// END OF EJS Templates
Strip non color related ANSI escape sequences from notebook output....
Jack Feser -
Show More
@@ -174,6 +174,12 b' IPython.utils = (function (IPython) {'
174 174 var cmds = [];
175 175 var opener = "";
176 176 var closer = "";
177
178 // Strip all ANSI codes that are not color related. Matches
179 // all ANSI codes that do not end with "m".
180 var ignored_re = /(?=(\033\[[\d;=]*[a-ln-zA-Z]{1}))\1(?!m)/g;
181 txt = txt.replace(ignored_re, "");
182
177 183 while (re.test(txt)) {
178 184 var cmds = txt.match(re)[1].split(";");
179 185 closer = opened?"</span>":"";
General Comments 0
You need to be logged in to leave comments. Login now