Skip to content

Commit a4d859c

Browse files
notriddlejgm
authored andcommitted
Accept lowercase inline HTML declarations
1 parent 3ef341b commit a4d859c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var OPENTAG = "<" + TAGNAME + ATTRIBUTE + "*" + "\\s*/?>";
2626
var CLOSETAG = "</" + TAGNAME + "\\s*[>]";
2727
var HTMLCOMMENT = "<!-->|<!--->|<!--(?:[^-]|-[^-]|--[^>])*-->"
2828
var PROCESSINGINSTRUCTION = "[<][?][\\s\\S]*?[?][>]";
29-
var DECLARATION = "<![A-Z]+" + "[^>]*>";
29+
var DECLARATION = "<![A-Za-z]+" + "[^>]*>";
3030
var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";
3131
var HTMLTAG =
3232
"(?:" +

test/regression.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,14 @@ x <- 1
491491
""third [test]
492492
.
493493
<p>&quot;&quot;third <a href="example">test</a></p>
494-
````````````````````````````````
494+
````````````````````````````````
495+
496+
#283
497+
```````````````````````````````` example
498+
x<!x>
499+
500+
x<!>
501+
.
502+
<p>x<!x></p>
503+
<p>x&lt;!&gt;</p>
504+
````````````````````````````````

0 commit comments

Comments
 (0)