mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-30 11:04:50 +00:00
allow empty comment in HTML parser
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3091 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
aeb698cbec
commit
df66edb7c3
2 changed files with 7 additions and 0 deletions
|
|
@ -231,6 +231,12 @@ RX_DATA [-a-zA-Z0-9_:]+
|
|||
}
|
||||
|
||||
/*********************** COMMENT ************************/
|
||||
<INITIAL><!> {
|
||||
UPDATE_COLUMN;
|
||||
SETLVAL_UNICODE;
|
||||
RETURN(T_COMMENT);
|
||||
}
|
||||
|
||||
/* Note: also accept "<! --" and "<!- " */
|
||||
<INITIAL><!-- {
|
||||
UPDATE_COLUMN;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ parsetests = [
|
|||
("""<!---- />-->""", """<!---- />-->"""),
|
||||
("""<!-- a-2 -->< 9>""", """<!-- a-2 --><9>"""),
|
||||
("""<!-- --- -->< 10>""", """<!-- --- --><10>"""),
|
||||
("""<!>""", """<!---->"""), # empty comment
|
||||
# invalid comments
|
||||
("""<!-- -- >< 8>""", """<!-- --><8>"""),
|
||||
("""<!---- >< 6>""", """<!----><6>"""),
|
||||
|
|
|
|||
Loading…
Reference in a new issue