Skip to content

Commit 5b85be3

Browse files
authored
fix(chat): normalize markdown list and heading spacing (#9392)
1 parent 5a98a62 commit 5b85be3

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content

‎apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const PROSE_CLASSES = cn(
9191
'prose prose-base dark:prose-invert max-w-none',
9292
'antialiased break-words tracking-[0]',
9393
'prose-headings:font-semibold prose-headings:tracking-[0] prose-headings:text-[var(--text-primary)]',
94-
'prose-headings:mb-3 prose-headings:mt-6 first:prose-headings:mt-0',
94+
'prose-headings:mb-3 prose-headings:mt-6 prose-headings:first:mt-0',
9595
'prose-p:text-base prose-p:leading-[25px] prose-p:text-[var(--text-primary)]',
9696
'prose-li:text-base prose-li:leading-[25px] prose-li:text-[var(--text-primary)]',
9797
'prose-li:my-1',
@@ -783,13 +783,10 @@ function ChatContentInner({
783783
{groups.map((group, i) => {
784784
if (group.kind === 'inline') {
785785
return (
786-
<div
787-
key={`inline-${i}`}
788-
data-chat-find-content
789-
className={cn(PROSE_CLASSES, '[&>:first-child]:mt-0 [&>:last-child]:mb-0')}
790-
>
786+
<div key={`inline-${i}`} data-chat-find-content className={PROSE_CLASSES}>
791787
<Streamdown
792788
key={streamingTree ? 'stream' : 'settled'}
789+
className='[&>p+ol]:mt-2 [&>p+ul]:mt-2 [&>p:has(+ul,+ol)]:mb-2'
793790
mode={parserTree ? undefined : 'static'}
794791
animated={fadeActive ? STREAM_ANIMATION : false}
795792
isAnimating={streamingTree}

0 commit comments

Comments
 (0)