diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-09-08 09:51:40 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-09-11 11:17:40 -0700 |
commit | 9dde9c96a7b7fb9810a60ae65dd2623b03b83da8 (patch) | |
tree | 4bc6f8a4d8b1093c8766a59ea173ddad269bbea7 /js | |
parent | a407869dfc062d6ec24f00482aae6019e083d8c7 (diff) |
Fixed reMain regex for better performance.
Diffstat (limited to 'js')
-rwxr-xr-x | js/stmd.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |