瀏覽代碼

Escape capturing prices with dollar sign as math expressions (#1985)

Chenhe Gu 1 年之前
父節點
當前提交
0025ba4921
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/app/components/base/markdown.tsx

+ 1 - 1
web/app/components/base/markdown.tsx

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