fix: markdown '$$' rendering issue

This commit is contained in:
Timothy J. Baek 2024-08-08 15:27:51 +02:00
parent 8afc8c5714
commit e491e96f88

View File

@ -9,7 +9,7 @@ import { WEBUI_BASE_URL } from '$lib/constants';
const convertLatexToSingleLine = (content) => {
// Patterns to match multiline LaTeX blocks
const patterns = [
/(\$\$[\s\S]*?\$\$)/g, // Match $$ ... $$
/(\$\$\s[\s\S]*?\s\$\$)/g, // Match $$ ... $$
/(\\\[[\s\S]*?\\\])/g, // Match \[ ... \]
/(\\begin\{[a-z]+\}[\s\S]*?\\end\{[a-z]+\})/g // Match \begin{...} ... \end{...}
];