mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Fix: Unformatted html tag
This commit is contained in:
@@ -372,7 +372,7 @@ function formatFn(val)
|
|||||||
|
|
||||||
function formatEl(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;
|
let regUrl = /(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export default class Sources extends Tool
|
|||||||
switch (data.type)
|
switch (data.type)
|
||||||
{
|
{
|
||||||
case 'html':
|
case 'html':
|
||||||
code = beautify.html(code);
|
code = beautify.html(code, {unformatted: []});
|
||||||
break;
|
break;
|
||||||
case 'css':
|
case 'css':
|
||||||
code = beautify.css(code);
|
code = beautify.css(code);
|
||||||
|
|||||||
Reference in New Issue
Block a user