Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix [ID:0] not converted to Fig. 1 (#16357)

Wang Qi31e50b164f2b
diff --git a/web/src/components/floating-chat-widget-markdown.tsx b/web/src/components/floating-chat-widget-markdown.tsx
index dc22b5292b..88f5ed7ce1 100644
--- a/web/src/components/floating-chat-widget-markdown.tsx
+++ b/web/src/components/floating-chat-widget-markdown.tsx
@@ -294,7 +294,7 @@ const FloatingChatWidgetMarkdown = ({
return (
<div className="floating-chat-widget" dir={dir}>
<Markdown
- rehypePlugins={[rehypeWrapReference, rehypeKatex, rehypeRaw]}
+ rehypePlugins={[rehypeRaw, rehypeWrapReference, rehypeKatex]}
remarkPlugins={MarkdownRemarkPlugins}
className="text-sm leading-relaxed space-y-2 prose-sm max-w-full"
components={
diff --git a/web/src/components/markdown-content/index.tsx b/web/src/components/markdown-content/index.tsx
index 3c6dfd927b..1d5affe156 100644
--- a/web/src/components/markdown-content/index.tsx
+++ b/web/src/components/markdown-content/index.tsx
@@ -260,7 +260,7 @@ const MarkdownContent = ({
return (
<div dir={dir} className={styles.markdownContentWrapper}>
<Markdown
- rehypePlugins={[rehypeWrapReference, rehypeKatex, rehypeRaw]}
+ rehypePlugins={[rehypeRaw, rehypeWrapReference, rehypeKatex]}
remarkPlugins={MarkdownRemarkPlugins}
components={
{
diff --git a/web/src/components/next-markdown-content/index.tsx b/web/src/components/next-markdown-content/index.tsx
index 0e8e3f8230..fdd1c5ec93 100644
--- a/web/src/components/next-markdown-content/index.tsx
+++ b/web/src/components/next-markdown-content/index.tsx
@@ -357,7 +357,7 @@ function MarkdownContent({
return (
<div dir={dir} className={styles.markdownContentWrapper}>
<Markdown
- rehypePlugins={[rehypeWrapReference, rehypeKatex, rehypeRaw]}
+ rehypePlugins={[rehypeRaw, rehypeWrapReference, rehypeKatex]}
remarkPlugins={MarkdownRemarkPlugins}
urlTransform={(url, key) => {
if (
diff --git a/web/src/pages/next-search/markdown-content/index.tsx b/web/src/pages/next-search/markdown-content/index.tsx
index 7149e2b8f0..cb32a95a2a 100644
--- a/web/src/pages/next-search/markdown-content/index.tsx
+++ b/web/src/pages/next-search/markdown-content/index.tsx
@@ -248,7 +248,7 @@ const MarkdownContent = ({
className="[&>section.think]:pl-[10px] [&>section.think]:text-[#8b8b8b] [&>section.think]:border-l-2 [&>section.think]:border-l-[#d5d3d3] [&>section.think]:mb-[10px] [&>section.think]:text-xs [&>blockquote]:pl-[10px] [&>blockquote]:border-l-4 [&>blockquote]:border-l-[#ccc] text-sm"
>
<Markdown
- rehypePlugins={[rehypeWrapReference, rehypeKatex, rehypeRaw]}
+ rehypePlugins={[rehypeRaw, rehypeWrapReference, rehypeKatex]}
remarkPlugins={MarkdownRemarkPlugins}
components={
{