From e5fe81de4df8dac0facefdb24f2a16490c9a8fcb Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 26 Feb 2025 18:15:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20preserve=20line=20brea?= =?UTF-8?q?ks=20and=20whitespace=20in=20chat=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add CSS styling to preserve return lines and whitespace in chat messages, fixing display issues that were causing broken line formatting. --- .../src/features/rooms/livekit/components/chat/Entry.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/features/rooms/livekit/components/chat/Entry.tsx b/src/frontend/src/features/rooms/livekit/components/chat/Entry.tsx index 825ba211..2981f8a9 100644 --- a/src/frontend/src/features/rooms/livekit/components/chat/Entry.tsx +++ b/src/frontend/src/features/rooms/livekit/components/chat/Entry.tsx @@ -19,7 +19,6 @@ export const ChatEntry: ( { entry, hideMetadata = false, messageFormatter, ...props }: ChatEntryProps, ref ) { - // Fixme - Livekit messageFormatter strips '\n' char const formattedMessage = React.useMemo(() => { return messageFormatter ? messageFormatter(entry.message) : entry.message }, [entry.message, messageFormatter]) @@ -58,6 +57,7 @@ export const ChatEntry: ( variant="sm" margin={false} className={css({ + whiteSpace: 'pre-wrap', '& .lk-chat-link': { color: 'blue', textDecoration: 'underline',