|
|
@@ -116,7 +116,11 @@ this.singlefile.lib.modules.serializer = this.singlefile.lib.modules.serializer
|
|
|
Array.from(element.attributes).forEach(attribute => content += serializeAttribute(attribute, element, compressHTML));
|
|
|
content += ">";
|
|
|
}
|
|
|
- Array.from(element.childNodes).forEach(childNode => content += serialize(childNode, compressHTML));
|
|
|
+ if (element.tagName == "TEMPLATE") {
|
|
|
+ content += element.innerHTML;
|
|
|
+ } else {
|
|
|
+ Array.from(element.childNodes).forEach(childNode => content += serialize(childNode, compressHTML));
|
|
|
+ }
|
|
|
const omittedEndTag = compressHTML && OMITTED_END_TAGS.find(omittedEndTag => tagName == omittedEndTag.tagName && omittedEndTag.accept(element.nextSibling, element));
|
|
|
if (!omittedEndTag && !SELF_CLOSED_TAG_NAMES.includes(tagName)) {
|
|
|
content += "</" + tagName + ">";
|