Commit 24841ef3ff28aba086d59940d64f36fbbeeef6e4

Fernando Montoya 2016-02-06T16:21:04

Removed firstWhiteSpaces code

diff --git a/plugins/keep-markup/prism-keep-markup.js b/plugins/keep-markup/prism-keep-markup.js
index fff0b88..0e20c1e 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;
 				}
 			}