From 765eedf8944757426ec53ae6edf829f3ca0d003a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 9 Jan 2015 14:42:36 -0800 Subject: Simplified reMain for more performance gains. --- js/lib/inlines.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/lib/inlines.js b/js/lib/inlines.js index ff3ffde..553be53 100644 --- a/js/lib/inlines.js +++ b/js/lib/inlines.js @@ -71,7 +71,7 @@ var reEntity = new RegExp(ENTITY, 'gi'); // Matches a character with a special meaning in markdown, // or a string of non-special characters. Note: we match // clumps of _ or * or `, because they need to be handled in groups. -var reMain = /^(?:[_*`\n]+|[\[\]\\!<&*_]|[^\n`\[\]\\!<&*_]+)/m; +var reMain = /^[^\n`\[\]\\!<&*_]+/m; // Replace entities and backslash escapes with literal characters. var unescapeString = function(s) { @@ -760,7 +760,6 @@ var parseInline = function(block) { var res; switch(c) { case C_NEWLINE: - case C_SPACE: res = this.parseNewline(block); break; case C_BACKSLASH: -- cgit v1.2.3