fix: Dollar Sign Handling in Markdown (#13178)

Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
Riddhimaan-Senapati 2025-02-04 22:00:56 -05:00 committed by GitHub
parent e9e34c1ab2
commit 55ce3618ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -229,7 +229,11 @@ export function Markdown(props: { content: string; className?: string }) {
return ( return (
<div className={cn(props.className, 'markdown-body')}> <div className={cn(props.className, 'markdown-body')}>
<ReactMarkdown <ReactMarkdown
remarkPlugins={[RemarkGfm, RemarkMath, RemarkBreaks]} remarkPlugins={[
RemarkGfm,
[RemarkMath, { singleDollarTextMath: false }],
RemarkBreaks,
]}
rehypePlugins={[ rehypePlugins={[
RehypeKatex, RehypeKatex,
RehypeRaw as any, RehypeRaw as any,