Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2020-11-11 11:21:37 +01:00
parent 98a8851cd5
commit 638805ec47
1 changed files with 2 additions and 1 deletions

View File

@ -3305,7 +3305,8 @@ module.exports = (_ => {
let template = document.createElement("template");
try {template.innerHTML = html.replace(/(?<!pre)>[\t\r\n]+<(?!pre)/g, "><");}
catch (err) {template.innerHTML = html.replace(/>[\t\r\n]+<(?!pre)/g, "><");}
if (template.content.childNodes.length == 1) return template.content.firstElementChild;
if (template.content.childNodes.length == 0) return template.innerHTML;
else if (template.content.childNodes.length == 1) return template.content.firstElementChild;
else {
let wrapper = document.createElement("span");
let nodes = Array.from(template.content.childNodes);