Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Dollar Sign Handling in Markdown (#13178)

Riddhimaan-Senapati55ce3618ce9c
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index b77dee9a617..b26d9df30e0 100644
--- a/web/app/components/base/markdown.tsx
+++ b/web/app/components/base/markdown.tsx
@@ -229,7 +229,11 @@ export function Markdown(props: { content: string; className?: string }) {
return (
<div className={cn(props.className, 'markdown-body')}>
<ReactMarkdown
- remarkPlugins={[RemarkGfm, RemarkMath, RemarkBreaks]}
+ remarkPlugins={[
+ RemarkGfm,
+ [RemarkMath, { singleDollarTextMath: false }],
+ RemarkBreaks,
+ ]}
rehypePlugins={[
RehypeKatex,
RehypeRaw as any,