This commit is contained in:
the-djmaze 2022-03-13 19:51:14 +01:00
parent 42813b90dd
commit 58f5e90f8f
3 changed files with 6 additions and 11 deletions

View file

@ -95,9 +95,7 @@ export const
];
tpl.innerHTML = html
.replace(/(<pre[^>]*>)([\s\S]*?)(<\/pre>)/gi, aMatches => {
return (aMatches[1] + aMatches[2].trim() + aMatches[3].trim()).replace(/\r?\n/g, '<br>');
})
// .replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, pre => pre.replace(/\n/g, '\n<br>'))
.replace(/<!doctype[^>]*>/gi, '')
.replace(/<\?xml[^>]*\?>/gi, '')
// Not supported by <template> element