Update markdown.js to handle links correctly

This commit is contained in:
2026-01-31 14:21:29 +01:00
parent fed15761ad
commit ec5bc01ab6

View File

@@ -179,7 +179,7 @@ export function markdownToHTML(text) {
return ''; 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 url = safeLink(href);
const tooltip = escapeHtml(href || ''); const tooltip = escapeHtml(href || '');
if (!url) return label; if (!url) return label;