summaryrefslogtreecommitdiff
path: root/src/scanners.re
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-03 18:55:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-03 18:56:02 -0800
commit2a477bb14758a2849c1e8aa14bafba6bb749bf35 (patch)
tree61a5a8bd687946e363181c950a0ecdf50bb59540 /src/scanners.re
parent1e789d0f2036d3d891232a0bced0a5009fb5ec03 (diff)
scanners.re: More accurate regex for HTML comments.
Note: this only affects inline parsing. Block parsing is handled differently.
Diffstat (limited to 'src/scanners.re')
-rw-r--r--src/scanners.re2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scanners.re b/src/scanners.re
index cf53dc5..ca25c16 100644
--- a/src/scanners.re
+++ b/src/scanners.re
@@ -49,7 +49,7 @@ int _scan_at(int (*scanner)(const unsigned char *), cmark_chunk *c, int offset)
opentag = tagname attribute* spacechar* [/]? [>];
closetag = [/] tagname spacechar* [>];
- htmlcomment = "!--" ([^-\x00]+ | [-][^-\x00]+)* "-->";
+ htmlcomment = "!---->" | ("!--" ([-]? [^\x00>-]) ([-]? [^\x00-])* "-->");
processinginstruction = "?" ([^?>\x00]+ | [?][^>\x00] | [>])* "?>";