Fix doctype tests

I don't think linkchecker actually cares about the document type, so I'm
not sure why we're even testing this...
This commit is contained in:
Marius Gedminas 2020-03-23 10:56:57 +02:00
parent 5eaad24641
commit a311ebb97e
2 changed files with 2 additions and 2 deletions

View file

@ -151,7 +151,7 @@ class HtmlPrettyPrinter (object):
@type data: string
@return: None
"""
self.fd.write("<!DOCTYPE%s>" % data)
self.fd.write("<!DOCTYPE %s>" % data)
def pi (self, data):
"""

View file

@ -93,7 +93,7 @@ class Parser(object):
self.handler.comment(comment)
elif isinstance(content, Doctype):
if hasattr(self.handler, 'doctype'):
self.handler.doctype(content[7:])
self.handler.doctype(content)
elif isinstance(content, Comment):
if hasattr(self.handler, 'comment'):
self.handler.comment(content.strip())