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.

hotfix: Workflow page element warning problem #17787 (#17789)

Jimmiaxie605ab9e46c04
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index 0e583fd48f9..987a4d0c148 100644
--- a/web/app/components/base/markdown.tsx
+++ b/web/app/components/base/markdown.tsx
@@ -222,19 +222,21 @@ const Paragraph = (paragraph: any) => {
const children_node = node.children
if (children_node && children_node[0] && 'tagName' in children_node[0] && children_node[0].tagName === 'img') {
return (
- <>
+ <div className="markdown-img-wrapper">
<ImageGallery srcs={[children_node[0].properties.src]} />
{
- Array.isArray(paragraph.children) ? <p>{paragraph.children.slice(1)}</p> : null
+ Array.isArray(paragraph.children) && paragraph.children.length > 1 && (
+ <div className="mt-2">{paragraph.children.slice(1)}</div>
+ )
}
- </>
+ </div>
)
}
return <p>{paragraph.children}</p>
}
const Img = ({ src }: any) => {
- return (<ImageGallery srcs={[src]} />)
+ return <div className="markdown-img-wrapper"><ImageGallery srcs={[src]} /></div>
}
const Link = ({ node, ...props }: any) => {