Fix incorrect import of multiple inline math.

This commit is contained in:
SiriusXT 2025-05-10 22:56:36 +08:00
parent 35c98f23bd
commit 047109f821

View File

@ -25,7 +25,7 @@ class CustomMarkdownRenderer extends Renderer {
`<span class="math-tex">\\\[$1\\\]</span>`);
// Inline math
text = text.replaceAll(/(?<!\\)\$(.+)\$/g,
text = text.replaceAll(/(?<!\\)\$(.+?)\$/g,
`<span class="math-tex">\\\($1\\\)</span>`);
}