close #42 fallback to html when doctype is invalid

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent c43189d3fe
commit 79f1ba574a
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,
);