summaryrefslogtreecommitdiff
path: root/Lib/markupbase.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-12-19 07:28:08 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2011-12-19 07:28:08 +0200
commit6b7003a18c2fa7378eb5ec5766ded01dee212c85 (patch)
treef7a08672e12078a67bf2e1d84c1cc0be7f8decf3 /Lib/markupbase.py
parent2d679a42bf229692e4400e1efc26eb13d2375c02 (diff)
downloadcpython-git-6b7003a18c2fa7378eb5ec5766ded01dee212c85.tar.gz
#13576: add tests about the handling of (possibly broken) condcoms.
Diffstat (limited to 'Lib/markupbase.py')
-rw-r--r--Lib/markupbase.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/markupbase.py b/Lib/markupbase.py
index 24808d185b..ddeb9835b8 100644
--- a/Lib/markupbase.py
+++ b/Lib/markupbase.py
@@ -108,6 +108,10 @@ class ParserBase:
if decltype == "doctype":
self.handle_decl(data)
else:
+ # According to the HTML5 specs sections "8.2.4.44 Bogus
+ # comment state" and "8.2.4.45 Markup declaration open
+ # state", a comment token should be emitted.
+ # Calling unknown_decl provides more flexibility though.
self.unknown_decl(data)
return j + 1
if c in "\"'":