Skip to content

Commit

Permalink
Handle multiple carriage returns before a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Feb 27, 2018
1 parent bdf354b commit 68de032
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/outputarea/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ class OutputAreaModel implements IOutputAreaModel {
*/
private _fixCarriageReturn(txt: string): string {
let tmp = txt;
// Handle multiple carriage returns before a newline
tmp = tmp.replace(/\r\r+\n/gm, '\r\n');
// Remove chunks that should be overridden by carriage returns
do {
// Remove any chunks preceding a carriage return unless carriage
Expand Down

0 comments on commit 68de032

Please sign in to comment.