🐛(frontend) preserve line breaks and whitespace in chat messages

Add CSS styling to preserve return lines and whitespace in chat messages,
fixing display issues that were causing broken line formatting.
This commit is contained in:
lebaudantoine
2025-02-26 18:15:38 +01:00
committed by aleb_the_flash
parent 38ab001bcf
commit e5fe81de4d

View File

@@ -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',