feat(import/markdown): import in-line math properly

This commit is contained in:
Elian Doran
2025-04-05 09:59:10 +03:00
parent 07b5cd3b05
commit e6b9ecda5c
2 changed files with 5 additions and 1 deletions

View File

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