We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 704ba4f commit 24841efCopy full SHA for 24841ef
plugins/keep-markup/prism-keep-markup.js
@@ -5,7 +5,6 @@
5
}
6
7
Prism.hooks.add('before-highlight', function (env) {
8
- var firstWhiteSpaces = false;
9
var pos = 0;
10
var data = [];
11
var f = function (elt, baseNode) {
@@ -21,11 +20,6 @@
21
20
if (child.nodeType === 1) { // element
22
f(child);
23
} else if(child.nodeType === 3) { // text
24
- if(!firstWhiteSpaces) {
25
- // We need to ignore the first white spaces in the code block
26
- child.data = child.data.replace(/^(?:\r\n|\r)/, '');
27
- firstWhiteSpaces = true;
28
- }
29
pos += child.data.length;
30
31
0 commit comments