From e491e96f88b9f3d3826d335bffd0909dc76674bf Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 8 Aug 2024 15:27:51 +0200 Subject: [PATCH] fix: markdown '$$' rendering issue --- src/lib/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 385b006ab..5b5c69047 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -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{...} ];