summaryrefslogtreecommitdiff
path: root/js/stmd.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-08 09:51:40 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-11 11:17:40 -0700
commit9dde9c96a7b7fb9810a60ae65dd2623b03b83da8 (patch)
tree4bc6f8a4d8b1093c8766a59ea173ddad269bbea7 /js/stmd.js
parenta407869dfc062d6ec24f00482aae6019e083d8c7 (diff)
Fixed reMain regex for better performance.
Diffstat (limited to 'js/stmd.js')
-rwxr-xr-xjs/stmd.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 7d0a532..cfd5051 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -71,7 +71,7 @@ var reHrule = /^(?:(?:\* *){3,}|(?:_ *){3,}|(?:- *){3,}) *$/;
// Matches a character with a special meaning in markdown,
// or a string of non-special characters.
-var reMain = /^(?: +|[\n`\[\]\\!<&*_]|[^\n `\[\]\\!<&*_]+)/m;
+var reMain = /^(?:[\n`\[\]\\!<&*_]|(?: *[^\n `\[\]\\!<&*_]+)+|[ \n]+)/m;
// UTILITY FUNCTIONS