From 28d61f5b6b1e0863857c9e1368b3f7698c2f67dd Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 12 Jan 2014 18:17:37 -0500 Subject: Improved multiline comment parsing. Fixes #257 and slightly alters comment parsing behavior. Unlike self-closing tags, a comment can contain angle brackets between the opening and closing tags. The greaterthan angle bracket at the end of the first block should not be mistaken for closing the comment. Need to actually check for a comment closing tag (`-->`). If one if not found, then the comment keeps going (to the end of the document if nessecary) just like in HTML. That last bit is a slight change from previous behavior, but should be unsurprising as that's how broswers parse html comments. And as far as I can tell, more implementations follow this behavior than any other. The ones that don't seem to be all over the place. --- tests/misc/multiline-comments.html | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests/misc/multiline-comments.html') diff --git a/tests/misc/multiline-comments.html b/tests/misc/multiline-comments.html index 29c17e9..4bdd5d0 100644 --- a/tests/misc/multiline-comments.html +++ b/tests/misc/multiline-comments.html @@ -14,4 +14,24 @@ foo foo - \ No newline at end of file + + + + + + + + + + +