From 24841ef3ff28aba086d59940d64f36fbbeeef6e4 Mon Sep 17 00:00:00 2001 From: Fernando Montoya Date: Sat, 6 Feb 2016 16:21:04 -0500 Subject: [PATCH] Removed firstWhiteSpaces code --- plugins/keep-markup/prism-keep-markup.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/keep-markup/prism-keep-markup.js b/plugins/keep-markup/prism-keep-markup.js index fff0b889ad..0e20c1e9f9 100644 --- a/plugins/keep-markup/prism-keep-markup.js +++ b/plugins/keep-markup/prism-keep-markup.js @@ -5,7 +5,6 @@ } Prism.hooks.add('before-highlight', function (env) { - var firstWhiteSpaces = false; var pos = 0; var data = []; var f = function (elt, baseNode) { @@ -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; } }