From 374ce68b84862ccfae2c146064c595c8d4d4312e Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Fri, 13 Feb 2026 08:33:56 +0800 Subject: [PATCH] fix(ui): remove math plugins and disable single-tilde strikethrough - Remove remarkMath and rehypeKatex plugins that caused text wrapping issues by interpreting $ signs as LaTeX delimiters - Configure remarkGfm with singleTilde: false to prevent single ~ from being parsed as strikethrough (e.g., ~1000 should not become ) - Only double tilde ~~text~~ now renders as strikethrough Co-Authored-By: Claude Opus 4.5 --- packages/ui/src/components/markdown/Markdown.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/components/markdown/Markdown.tsx b/packages/ui/src/components/markdown/Markdown.tsx index d201b9c1..9ea7b162 100644 --- a/packages/ui/src/components/markdown/Markdown.tsx +++ b/packages/ui/src/components/markdown/Markdown.tsx @@ -1,13 +1,10 @@ import * as React from 'react' import ReactMarkdown, { type Components } from 'react-markdown' -import rehypeKatex from 'rehype-katex' import rehypeRaw from 'rehype-raw' import remarkGfm from 'remark-gfm' -import remarkMath from 'remark-math' import { cn } from '@multica/ui/lib/utils' import { CodeBlock, InlineCode } from './CodeBlock' import { preprocessLinks } from './linkify' -import 'katex/dist/katex.min.css' /** * Render modes for markdown content: @@ -273,8 +270,8 @@ export function Markdown({ return (
{processedContent}