Eliott C commited on
💄 Preserve whitespace in user message (#39)
Browse files52 unmodified lines53545556575859606135 unmodified lines97989910010110210310452 unmodified linesrenderer};$: browser && marked(sanitizeMd(message.content), options, handleParsed);html = marked(sanitizeMd(message.content), options);afterUpdate(() => {if (el) {35 unmodified lines{#if message.from === 'user'}<div class="flex items-start justify-start gap-4"><div class="mt-5 w-3 h-3 flex-none rounded-full" /><div class="rounded-2xl px-5 py-3.5 text-gray-500 dark:text-gray-400">{message.content}</div></div>{/if}52 unmodified lines535455565758596061626335 unmodified lines9910010110210310410510652 unmodified linesrenderer};$: browser && message.from === 'assistant' && marked(sanitizeMd(message.content), options, handleParsed);if (message.from === 'assistant') {html = marked(sanitizeMd(message.content), options);}afterUpdate(() => {if (el) {35 unmodified lines{#if message.from === 'user'}<div class="flex items-start justify-start gap-4"><div class="mt-5 w-3 h-3 flex-none rounded-full" /><div class="rounded-2xl px-5 py-3.5 text-gray-500 dark:text-gray-400 whitespace-break-spaces">{message.content.trim()}</div></div>{/if}
src/lib/components/chat/ChatMessage.svelte+6-4