From 0fa620719b6c4dd0ace6fae3b64660963fd9aa84 Mon Sep 17 00:00:00 2001 From: shadcn Date: Sun, 11 Jun 2023 15:31:47 +0400 Subject: [PATCH] fix: let prose handle table rendering --- components/chat-message.tsx | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/components/chat-message.tsx b/components/chat-message.tsx index 70a2eba..7d5675d 100644 --- a/components/chat-message.tsx +++ b/components/chat-message.tsx @@ -42,16 +42,7 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) { remarkPlugins={[remarkGfm, remarkMath]} components={{ p({ children }) { - return ( -

- {children} -

- ) + return

{children}

}, code({ node, inline, className, children, ...props }) { if (children.length) { @@ -78,27 +69,6 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) { {children} ) - }, - table({ children }) { - return ( - - {children} -
- ) - }, - th({ children }) { - return ( - - {children} - - ) - }, - td({ children }) { - return ( - - {children} - - ) } }} >