fix(webui): render TeX math delimiters

This commit is contained in:
chengyongru
2026-06-09 14:50:49 +08:00
committed by Xubin Ren
parent 0a396aa6e2
commit 5bd4a83e85
3 changed files with 364 additions and 0 deletions
@@ -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];