From 149ca0102930ddea224877ac81682304ae7b3324 Mon Sep 17 00:00:00 2001 From: jang_yoonsu Date: Sat, 18 May 2024 20:43:13 +0900 Subject: [PATCH] fix : Add group property to code block parent element and add copy button condition --- .../src/conversation/ConversationBubble.tsx | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index db26d55..9877db6 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -83,22 +83,16 @@ const ConversationBubble = forwardRef< code({ node, inline, className, children, ...props }) { const match = /language-(\w+)/.exec(className || ''); - return ( -
- {!inline && match ? ( - - {String(children).replace(/\n$/, '')} - - ) : ( - - {children} - - )} + return !inline && match ? ( +
+ + {String(children).replace(/\n$/, '')} +
+ ) : ( + + {children} + ); }, ul({ children }) {