fix(webui): render TeX math delimiters

This commit is contained in:
chengyongru authored and Xubin Ren committed 2026-06-09 14:50:49 +08:00
1 parent 0a396aa6e2
commit 5bd4a83e85
3 files changed
+364

No files matched your search

@@ -24,6 +24,7 @@ import {
} from "@/components/FileReferenceChip";
import { inferMediaKind } from "@/lib/media";
import { faviconUrls } from "@/lib/provider-brand";
import { remarkTexMath } from "@/lib/remark-tex-math";
import { cn } from "@/lib/utils";
import "katex/dist/katex.min.css";
@@ -190,6 +191,7 @@ const remarkPlugins: NonNullable<ReactMarkdownOptions["remarkPlugins"]> = [
remarkBreaks,
remarkGfm,
[remarkMath, { singleDollarTextMath: false }],
remarkTexMath,
remarkSafeHtmlSubset,
];
const rehypePlugins: NonNullable<ReactMarkdownOptions["rehypePlugins"]> = [rehypeKatex];