mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
Merge pull request #2561 from takluyver/notebook-carriage-return
Fix display of plain text containing multiple carriage returns before line feed
This commit is contained in:
commit
a0544ec066
@ -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…
Reference in New Issue
Block a user