mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
fix: markdown '$$' rendering issue
This commit is contained in:
parent
8afc8c5714
commit
e491e96f88
@ -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 New Issue
Block a user