cmark

My personal build of CMark ✏️

Commit
918867accab909c6efb2f762773b9f72c8f1014b
Parent
ab8b56178e80362c1a1250496f5cd14ab53f03f0
Author
John MacFarlane <jgm@berkeley.edu>
Date

Fixed CDATA regex in js.

Closes #267.

Diffstat

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
@@ -36,7 +36,7 @@ var CLOSETAG = "</" + TAGNAME + "\\s*[>]";
 var HTMLCOMMENT = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->";
 var PROCESSINGINSTRUCTION = "[<][?].*?[?][>]";
 var DECLARATION = "<![A-Z]+" + "\\s+[^>]*>";
-var CDATA = "<!\\[CDATA\\[([^\\]]+|\\][^\\]]|\\]\\][^>])*\\]\\]>";
+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});";