diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 046fcc7..3d84d00 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -2678,7 +2678,7 @@ const processed = line.replace(/`[^`]*`/g, m => '\x00'.repeat(m.length)); let result = line; let offset = 0; - for (const m of processed.matchAll(/(?`; result = result.slice(0, m.index! + offset) + html + result.slice(m.index! + m[0].length + offset); @@ -2834,7 +2834,7 @@ TableRow, CustomTableCell, CustomTableHeader, - Link.configure({ openOnClick: false, HTMLAttributes: { class: 'editor-link' }, isAllowedUri: (url, ctx) => ctx.defaultValidate(url) || !url.startsWith('javascript:') }), + Link.configure({ openOnClick: false, HTMLAttributes: { class: 'editor-link' }, isAllowedUri: (url, ctx) => ctx.defaultValidate(url) || !url.startsWith('javascript:'), shouldAutoLink: (url) => /^https?:\/\//.test(url) }), CustomImage.configure({ inline: true, HTMLAttributes: { class: 'editor-image' } }), Highlight.configure({ multicolor: true }), Typography,