|
|
@@ -31,7 +31,7 @@ this.serializer = this.serializer || (() => {
|
|
|
];
|
|
|
const OMITTED_END_TAGS = [
|
|
|
{ tagName: "html", accept: next => !next || next.nodeType != Node.COMMENT_NODE },
|
|
|
- { tagName: "head", accept: next => !next || next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent)) },
|
|
|
+ { tagName: "head", accept: next => !next || (next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
|
|
|
{ tagName: "body", accept: next => !next || next.nodeType != Node.COMMENT_NODE },
|
|
|
{ tagName: "li", accept: next => !next || ["LI"].includes(next.tagName) },
|
|
|
{ tagName: "dt", accept: next => !next || ["DT", "DD"].includes(next.tagName) },
|
|
|
@@ -41,8 +41,8 @@ this.serializer = this.serializer || (() => {
|
|
|
{ tagName: "rp", accept: next => !next || ["RT", "RP"].includes(next.tagName) },
|
|
|
{ tagName: "optgroup", accept: next => !next || ["OPTGROUP"].includes(next.tagName) },
|
|
|
{ tagName: "option", accept: next => !next || ["OPTION", "OPTGROUP"].includes(next.tagName) },
|
|
|
- { tagName: "colgroup", accept: next => !next || next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent)) },
|
|
|
- { tagName: "caption", accept: next => !next || next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent)) },
|
|
|
+ { tagName: "colgroup", accept: next => !next || (next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
|
|
|
+ { tagName: "caption", accept: next => !next || (next.nodeType != Node.COMMENT_NODE && (next.nodeType != Node.TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
|
|
|
{ tagName: "thead", accept: next => !next || ["TBODY", "TFOOT"].includes(next.tagName) },
|
|
|
{ tagName: "tbody", accept: next => !next || ["TBODY", "TFOOT"].includes(next.tagName) },
|
|
|
{ tagName: "tfoot", accept: next => !next },
|