From a8aab0a6c9046040cd99328c8fb716f3e46723fc Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 4 Oct 2011 17:40:33 -0500 Subject: [PATCH] whitespace normalization --- lib/marked.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index c2950f26..92b9a154 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -41,12 +41,9 @@ block.lexer = function(str) { var tokens = [] , links = {}; - // normalize whitespace - str = str.replace(/\r\n/g, '\n') - .replace(/\r/g, '\n') + str = str.replace(/\r\n|\r/g, '\n') .replace(/\t/g, ' '); - // grab link definitons str = str.replace( /^ {0,3}\[([^\]]+)\]: *([^ ]+)(?: +"([^\n]+)")? *$/gm, function(__, id, href, title) {