mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 21:35:19 +00:00
fix: markdown '$$' rendering issue
This commit is contained in:
parent
8afc8c5714
commit
e491e96f88
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ import { WEBUI_BASE_URL } from '$lib/constants';
|
||||||
const convertLatexToSingleLine = (content) => {
|
const convertLatexToSingleLine = (content) => {
|
||||||
// Patterns to match multiline LaTeX blocks
|
// Patterns to match multiline LaTeX blocks
|
||||||
const patterns = [
|
const patterns = [
|
||||||
/(\$\$[\s\S]*?\$\$)/g, // Match $$ ... $$
|
/(\$\$\s[\s\S]*?\s\$\$)/g, // Match $$ ... $$
|
||||||
/(\\\[[\s\S]*?\\\])/g, // Match \[ ... \]
|
/(\\\[[\s\S]*?\\\])/g, // Match \[ ... \]
|
||||||
/(\\begin\{[a-z]+\}[\s\S]*?\\end\{[a-z]+\})/g // Match \begin{...} ... \end{...}
|
/(\\begin\{[a-z]+\}[\s\S]*?\\end\{[a-z]+\})/g // Match \begin{...} ... \end{...}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue