Fix display of plain text containing multiple carriage returns before line feed.

Closes gh-2560
pull/37/head
Thomas Kluyver 14 years ago
parent 3254572a90
commit 015e8e73f4

@ -195,7 +195,8 @@ IPython.utils = (function (IPython) {
tmp = txt;
do {
txt = tmp;
tmp = txt.replace(/^.*\r(?!\n)/gm, '');
tmp = txt.replace(/\r+\n/gm, '\n'); // \r followed by \n --> newline
tmp = tmp.replace(/^.*\r+/gm, ''); // Other \r --> clear line
} while (tmp.length < txt.length);
return txt;
}

Loading…
Cancel
Save