Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 51f4472

Browse files
author
mikesamuel@gmail.com
committed
Tweak IE newline handling
1 parent fb8f359 commit 51f4472

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

js-modules/recombineTagsAndDecorations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function recombineTagsAndDecorations(job) {
6969
var textNode = spans[spanIndex + 1];
7070
if (textNode.nodeType !== 1) { // Don't muck with <BR>s or <LI>s
7171
var styledText = source.substring(sourceIndex, end);
72-
if (isIE) { styledText = styledText.replace(newlineRe, '\r\n'); }
72+
if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
7373
textNode.nodeValue = styledText;
7474
var document = textNode.ownerDocument;
7575
var span = document.createElement('SPAN');

src/prettify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ window['PR']
10661066
var textNode = spans[spanIndex + 1];
10671067
if (textNode.nodeType !== 1) { // Don't muck with <BR>s or <LI>s
10681068
var styledText = source.substring(sourceIndex, end);
1069-
if (isIE) { styledText = styledText.replace(newlineRe, '\r\n'); }
1069+
if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
10701070
textNode.nodeValue = styledText;
10711071
var document = textNode.ownerDocument;
10721072
var span = document.createElement('SPAN');

0 commit comments

Comments
 (0)