mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
Refactor Markdown component to include paragraph after image (#2798)
This commit is contained in:
parent
6854a3fd26
commit
870ca713df
|
@ -162,14 +162,17 @@ export function Markdown(props: { content: string; className?: string }) {
|
||||||
const image = node.children[0]
|
const image = node.children[0]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// eslint-disable-next-line @next/next/no-img-element
|
<>
|
||||||
<img
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||||
src={image.properties.src}
|
<img
|
||||||
width={250}
|
src={image.properties.src}
|
||||||
height={250}
|
width={250}
|
||||||
className="max-w-full h-auto align-middle border-none rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 ease-in-out mt-2 mb-2"
|
height={250}
|
||||||
alt={image.properties.alt}
|
className="max-w-full h-auto align-middle border-none rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 ease-in-out mt-2 mb-2"
|
||||||
/>
|
alt={image.properties.alt}
|
||||||
|
/>
|
||||||
|
<p>{paragraph.children.slice(1)}</p>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return <p>{paragraph.children}</p>
|
return <p>{paragraph.children}</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user