Skip to content

Commit

Permalink
Removed firstWhiteSpaces code
Browse files Browse the repository at this point in the history
  • Loading branch information
montogeek committed Feb 6, 2016
1 parent 704ba4f commit 24841ef
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions plugins/keep-markup/prism-keep-markup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
}

Prism.hooks.add('before-highlight', function (env) {
var firstWhiteSpaces = false;
var pos = 0;
var data = [];
var f = function (elt, baseNode) {
Expand All @@ -21,11 +20,6 @@
if (child.nodeType === 1) { // element
f(child);
} else if(child.nodeType === 3) { // text
if(!firstWhiteSpaces) {
// We need to ignore the first white spaces in the code block
child.data = child.data.replace(/^(?:\r\n|\r)/, '');
firstWhiteSpaces = true;
}
pos += child.data.length;
}
}
Expand Down

0 comments on commit 24841ef

Please sign in to comment.