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

Commit 00df688

Browse files
cleanup test golden now that we don't have to fixup spaces and convert newlines to breaks
1 parent 42ec81b commit 00df688

File tree

2 files changed

+364
-359
lines changed

2 files changed

+364
-359
lines changed

src/prettify.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,11 @@ window['PR']
10701070
var textNode = spans[spanIndex + 1];
10711071
if (textNode.nodeType !== 1) { // Don't muck with <BR>s or <LI>s
10721072
var styledText = source.substring(sourceIndex, end);
1073+
// This may seem bizarre, and it is. Emitting LF on IE causes the
1074+
// code to display with spaces instead of line breaks.
1075+
// Emitting Windows standard issue linebreaks (CRLF) causes a blank
1076+
// space to appear at the beginning of every line but the first.
1077+
// Emitting an old Mac OS 9 line separator makes everything spiffy.
10731078
if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
10741079
textNode.nodeValue = styledText;
10751080
var document = textNode.ownerDocument;

0 commit comments

Comments
 (0)