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

Commit 580df33

Browse files
author
mikesamuel
committed
fix bug 21: copy and paste in IE 6
1 parent 6c98923 commit 580df33

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/prettify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ window['_pr_isIE6'] = function () {
12891289
for (var j = lineBreaks.length; --j >= 0;) {
12901290
var lineBreak = lineBreaks[j];
12911291
lineBreak.parentNode.replaceChild(
1292-
document.createTextNode('\r\n'), lineBreak);
1292+
document.createTextNode('\r'), lineBreak);
12931293
}
12941294
}
12951295
}

tests/prettify_test.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
<script type="text/javascript">
2626
// get accurate timing
2727
PR_SHOULD_USE_CONTINUATION = false;
28-
_pr_isIE6 = function() { return false; }; // Ensure consistent output.
28+
if (!/[?&]testcopypaste\b/.test(location.search)) {
29+
_pr_isIE6 = function() { return false; }; // Ensure consistent output.
30+
}
2931
</script>
3032
<link rel="stylesheet" type="text/css" href="../src/prettify.css" />
3133
<style type="text/css">

0 commit comments

Comments
 (0)