From 8b5328cd65de1e1e4dd9237add2af6f288c0f240 Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Tue, 3 Dec 2024 15:38:31 -0500 Subject: [PATCH] [app] Proper line breaks for code blocks --- ui/desktop/src/components/MarkdownContent.tsx | 76 ++++++++++++------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/ui/desktop/src/components/MarkdownContent.tsx b/ui/desktop/src/components/MarkdownContent.tsx index 9e1ffdcb3d..20696890c7 100644 --- a/ui/desktop/src/components/MarkdownContent.tsx +++ b/ui/desktop/src/components/MarkdownContent.tsx @@ -23,12 +23,12 @@ const CodeBlock = ({ language, children }: { language: string; children: string }; return ( -
+
- - {children} - +
+ + {children} + +
); }; export default function MarkdownContent({ content, className = '' }: MarkdownContentProps) { return ( - - {String(children).replace(/\n$/, '')} - - ) : ( - - {children} - - ); - } - }} - > - {content} - +
+ + {String(children).replace(/\n$/, '')} + + ) : ( + + {children} + + ); + } + }} + > + {content} + +
); } \ No newline at end of file