##// END OF EJS Templates
Fix carriage-return handling regular expression so it doesn't treat "\r\n" as "\r".
Michael Droettboom -
Show More
@@ -43,7 +43,7 IPython.utils = (function (IPython) {
43 ansi_colormap = {
43 ansi_colormap = {
44 "30":"ansiblack", "31":"ansired",
44 "30":"ansiblack", "31":"ansired",
45 "32":"ansigreen", "33":"ansiyellow",
45 "32":"ansigreen", "33":"ansiyellow",
46 "34":"ansiblue", "35":"ansipurple","36":"ansicyan",
46 "34":"ansiblue", "35":"ansipurple","36":"ansicyan",
47 "37":"ansigrey", "01":"ansibold"
47 "37":"ansigrey", "01":"ansibold"
48 };
48 };
49
49
@@ -74,6 +74,16 IPython.utils = (function (IPython) {
74 return txt;
74 return txt;
75 }
75 }
76
76
77 // Remove chunks that should be overridden by the effect of
78 // carriage return characters
79 function fixCarriageReturn(txt) {
80 tmp = txt;
81 do {
82 txt = tmp;
83 tmp = txt.replace(/^.*\r(?!\n)/gm, '');
84 } while (tmp.length < txt.length);
85 return txt;
86 }
77
87
78 grow = function(element) {
88 grow = function(element) {
79 // Grow the cell by hand. This is used upon reloading from JSON, when the
89 // Grow the cell by hand. This is used upon reloading from JSON, when the
@@ -126,4 +136,3 IPython.utils = (function (IPython) {
126 };
136 };
127
137
128 }(IPython));
138 }(IPython));
129
General Comments 0
You need to be logged in to leave comments. Login now