소스 검색

fix: markdown '$$' rendering issue

Timothy J. Baek 9 달 전
부모
커밋
e491e96f88
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/lib/utils/index.ts

+ 1 - 1
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{...}
 	];