close #42 fallback to html when doctype is invalid

This commit is contained in:
Yanzhen Yu
2020-09-06 16:59:03 +08:00
parent 9d58205bf8
commit 8565b0d692
3 changed files with 19 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ function buildNode(
return doc.implementation.createDocument(null, '', null);
case NodeType.DocumentType:
return doc.implementation.createDocumentType(
n.name,
n.name || 'html',
n.publicId,
n.systemId,
);