Update 0BDFDB.plugin.js
This commit is contained in:
parent
638805ec47
commit
6b6a8383dd
|
@ -3305,8 +3305,7 @@ module.exports = (_ => {
|
||||||
let template = document.createElement("template");
|
let template = document.createElement("template");
|
||||||
try {template.innerHTML = html.replace(/(?<!pre)>[\t\r\n]+<(?!pre)/g, "><");}
|
try {template.innerHTML = html.replace(/(?<!pre)>[\t\r\n]+<(?!pre)/g, "><");}
|
||||||
catch (err) {template.innerHTML = html.replace(/>[\t\r\n]+<(?!pre)/g, "><");}
|
catch (err) {template.innerHTML = html.replace(/>[\t\r\n]+<(?!pre)/g, "><");}
|
||||||
if (template.content.childNodes.length == 0) return template.innerHTML;
|
if (template.content.childNodes.length == 1) return template.content.firstElementChild || template.content.firstChild;
|
||||||
else if (template.content.childNodes.length == 1) return template.content.firstElementChild;
|
|
||||||
else {
|
else {
|
||||||
let wrapper = document.createElement("span");
|
let wrapper = document.createElement("span");
|
||||||
let nodes = Array.from(template.content.childNodes);
|
let nodes = Array.from(template.content.childNodes);
|
||||||
|
|
Loading…
Reference in New Issue