|
|
@@ -28,9 +28,7 @@ this.serializer = this.serializer || (() => {
|
|
|
// see https://www.w3.org/TR/html5/syntax.html#optional-tags
|
|
|
const OMITTED_START_TAGS = [
|
|
|
{ tagName: "head", accept: element => !element.childNodes.length || element.childNodes[0].nodeType == Node.ELEMENT_NODE },
|
|
|
- { tagName: "body", accept: element => !element.childNodes.length },
|
|
|
- { tagName: "tbody", accept: element => element.childNodes[0] && element.childNodes[0].tagName == "TR" },
|
|
|
- { tagName: "colgroup", accept: element => element.childNodes[0] && element.childNodes[0].tagName == "COL" },
|
|
|
+ { tagName: "body", accept: element => !element.childNodes.length }
|
|
|
];
|
|
|
const OMITTED_END_TAGS = [
|
|
|
{ tagName: "html", accept: next => !next || next.nodeType != Node.COMMENT_NODE },
|