Update markdown.js to handle links correctly
This commit is contained in:
@@ -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;
|
||||||
@@ -272,4 +272,4 @@ function balanceStreamingCodeFence(md) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return md;
|
return md;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user