Skip to content

Commit

Permalink
Accept lowercase inline HTML declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle authored and jgm committed Mar 2, 2024
1 parent 3ef341b commit a4d859c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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]+" + "[^>]*>";
var DECLARATION = "<![A-Za-z]+" + "[^>]*>";
var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";
var HTMLTAG =
"(?:" +
Expand Down
12 changes: 11 additions & 1 deletion test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,14 @@ x <- 1
""third [test]
.
<p>&quot;&quot;third <a href="example">test</a></p>
````````````````````````````````
````````````````````````````````

#283
```````````````````````````````` example
x<!x>

x<!>
.
<p>x<!x></p>
<p>x&lt;!&gt;</p>
````````````````````````````````

0 comments on commit a4d859c

Please sign in to comment.