From ec5bc01ab63c7a86779f4845ca6a09e2c117992d Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 31 Jan 2026 14:21:29 +0100 Subject: [PATCH] Update markdown.js to handle links correctly --- src/markdown/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}