1
0
mirror of synced 2025-12-09 07:08:17 +08:00

Fix: Unformatted html tag

This commit is contained in:
surunzi
2017-08-19 18:39:00 +08:00
parent 82efef8e44
commit 3384df6199
2 changed files with 2 additions and 2 deletions

View File

@@ -372,7 +372,7 @@ function formatFn(val)
function formatEl(val)
{
return `<pre style="display:inline">${highlight(beautify.html(val.outerHTML), 'html')}</pre>`;
return `<pre style="display:inline">${highlight(beautify.html(val.outerHTML, {unformatted: []}), 'html')}</pre>`;
}
let regUrl = /(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;

View File

@@ -218,7 +218,7 @@ export default class Sources extends Tool
switch (data.type)
{
case 'html':
code = beautify.html(code);
code = beautify.html(code, {unformatted: []});
break;
case 'css':
code = beautify.css(code);