Skip to content

Commit

Permalink
Declarations do not need a space, per the spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Nov 3, 2022
1 parent 46538e5 commit 9a16ff4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var OPENTAG = "<" + TAGNAME + ATTRIBUTE + "*" + "\\s*/?>";
var CLOSETAG = "</" + TAGNAME + "\\s*[>]";
var HTMLCOMMENT = "<!-->|<!--->|<!--(?:[^-]+|-[^-]|--[^>])*-->"
var PROCESSINGINSTRUCTION = "[<][?][\\s\\S]*?[?][>]";
var DECLARATION = "<![A-Z]+" + "\\s+[^>]*>";
var DECLARATION = "<![A-Z]+" + "[^>]*>";
var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";
var HTMLTAG =
"(?:" +
Expand Down
8 changes: 8 additions & 0 deletions test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,11 @@ abc
.
<!docType html>
````````````````````````````````

Declarations don't need spaces, according to the spec (cmark#456)
```````````````````````````````` example
x <!A>
.
<p>x <!A></p>
````````````````````````````````

0 comments on commit 9a16ff4

Please sign in to comment.