diff --git a/src/markdown/markdown.js b/src/markdown/markdown.js index c5ab6bc..a64f109 100644 --- a/src/markdown/markdown.js +++ b/src/markdown/markdown.js @@ -179,7 +179,7 @@ export function markdownToHTML(text) { return ''; }; - html = html.replace(/$begin:math:display$\(\[\^$end:math:display$]+?)\]$begin:math:text$\(\[\^\)\]\+\?\)$end:math:text$/g, (_, label, href) => { + html = html.replace(/\[([^\]]+?)\]\(([^)]+?)\)/g, (_, label, href) => { const url = safeLink(href); const tooltip = escapeHtml(href || ''); if (!url) return label; @@ -272,4 +272,4 @@ function balanceStreamingCodeFence(md) { } return md; -} \ No newline at end of file +}