- Commit
- 765eedf8944757426ec53ae6edf829f3ca0d003a
- Parent
- 3c68dcac2d30616904840c52d359653ba1f746b4
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Simplified reMain for more performance gains.
My personal build of CMark ✏️
Simplified reMain for more performance gains.
1 file changed, 1 insertion, 2 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/inlines.js | 3 | 1 | 2 |
diff --git 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: