Commit 704ba4f951418ad8c6680a47a3f0381cb7c06bbd

Fernando Montoya 2016-02-06T00:02:15

Fix Keep Markup plugin incorrect highlighting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/plugins/keep-markup/prism-keep-markup.js b/plugins/keep-markup/prism-keep-markup.js
index 9038ed0..fff0b88 100644
--- a/plugins/keep-markup/prism-keep-markup.js
+++ b/plugins/keep-markup/prism-keep-markup.js
@@ -23,7 +23,7 @@
 				} 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)/, '');
+						child.data = child.data.replace(/^(?:\r\n|\r)/, '');
 						firstWhiteSpaces = true;
 					}
 					pos += child.data.length;
@@ -94,4 +94,4 @@
 			});
 		}
 	});
-}());
\ No newline at end of file
+}());