-
-
Notifications
You must be signed in to change notification settings - Fork 225
Closed
Description
I'm updating commonmark-java to version 0.31.2 of the spec and was wondering about HTML comment handling. Namely, given this spec:
An HTML comment consists of
<!-->
,<!--->
, or<!--
, a string of
characters not including the string-->
, and-->
(see the
HTML spec).
I think these two should be parsed as comments:
foo <!-- test --->
foo <!-- test ---->
However, with the current dingus they're not (example 1, example 2):
<p>foo <!-- test ---></p>
<p>foo <!-- test ----></p>
The reason is probably this regex:
Line 27 in a4d859c
var HTMLCOMMENT = "<!-->|<!--->|<!--(?:[^-]|-[^-]|--[^>])*-->" |
I think <!-->|<!--->|<!--.*?-->
would work as expected.
Metadata
Metadata
Assignees
Labels
No labels