Skip to content

Commit 9eff304

Browse files
committed
Allow None as a doctype tagname in lint
1 parent 2a5d7af commit 9eff304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html5lib/filters/lint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def __iter__(self):
8080

8181
elif type == "Doctype":
8282
name = token["name"]
83-
if not isinstance(name, text_type):
84-
raise LintError("Tag name is not a string: %(tag)r" % {"tag": name})
83+
if name is not None and not isinstance(name, text_type):
84+
raise LintError("Tag name is not a string or None: %(tag)r" % {"tag": name})
8585
# XXX: what to do with token["data"] ?
8686

8787
elif type in ("ParseError", "SerializeError"):

0 commit comments

Comments
 (0)