From 870ca713df4fb7b83700205a25e1fe80e8da82f1 Mon Sep 17 00:00:00 2001 From: Yulong Wang Date: Tue, 12 Mar 2024 22:06:54 +0800 Subject: [PATCH] Refactor Markdown component to include paragraph after image (#2798) --- web/app/components/base/markdown.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx index fb0cf5bb44..77ddcabed9 100644 --- a/web/app/components/base/markdown.tsx +++ b/web/app/components/base/markdown.tsx @@ -162,14 +162,17 @@ export function Markdown(props: { content: string; className?: string }) { const image = node.children[0] return ( - // eslint-disable-next-line @next/next/no-img-element - {image.properties.alt} + <> + {/* eslint-disable-next-line @next/next/no-img-element */} + {image.properties.alt} +

{paragraph.children.slice(1)}

+ ) } return

{paragraph.children}