From cfc039dae1e6078659034d36f406f18da8d087a8 Mon Sep 17 00:00:00 2001 From: Siddhant Rai Date: Tue, 20 Aug 2024 22:06:55 +0530 Subject: [PATCH] fix: refactor code for react-markdown 9.0.1 --- frontend/src/conversation/ConversationBubble.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 6ad877c3..a21e352d 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -226,19 +226,19 @@ const ConversationBubble = forwardRef< className="whitespace-pre-wrap break-normal leading-normal" remarkPlugins={[remarkGfm]} components={{ - code({ node, inline, className, children, ...props }) { + code(props) { + const { children, className, node, ref, ...rest } = props; const match = /language-(\w+)/.exec(className || ''); - return !inline && match ? ( + return match ? (
- {String(children).replace(/\n$/, '')} - + />