- Commit
- 3f4d605546fc82a3cdce8056790f1bb140a62903
- Parent
- 775cf28a2f6045caf652108092ab79ead3bc0056
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Fixed escaping error in CDATA regex.
Caught by sjs! This also improves performance measurably.
My personal build of CMark ✏️
Fixed escaping error in CDATA regex.
Caught by sjs! This also improves performance measurably.
1 file changed, 1 insertion, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/inlines.js | 2 | 1 | 1 |
diff --git a/js/lib/inlines.js b/js/lib/inlines.js @@ -43,7 +43,7 @@ var CLOSETAG = "</" + TAGNAME + "\\s*[>]"; var HTMLCOMMENT = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->"; var PROCESSINGINSTRUCTION = "[<][?].*?[?][>]"; var DECLARATION = "<![A-Z]+" + "\\s+[^>]*>"; -var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\]\\]>"; +var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"; var HTMLTAG = "(?:" + OPENTAG + "|" + CLOSETAG + "|" + HTMLCOMMENT + "|" + PROCESSINGINSTRUCTION + "|" + DECLARATION + "|" + CDATA + ")"; var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});";