收紧对话 Markdown 间距
减少段落和列表之间的空白,避免回复出现过多空行
This commit is contained in:
@@ -76,7 +76,7 @@ function MarkdownUnorderedList({ children }: { children?: ReactNode }) {
|
||||
<ListDepthContext.Provider value={depth + 1}>
|
||||
{/* 用真正的列表标记(`list-disc`)而不是手写 `'- '` 文本:手写前缀既没有悬挂缩进
|
||||
(换行后的第二行会顶回最左边),也不算列表语义(读屏读成普通文本)。 */}
|
||||
<ul className="m-0 mt-2 list-disc space-y-1 pl-4 first:mt-0">
|
||||
<ul className="m-0 mt-1 list-disc space-y-0.5 pl-4 first:mt-0">
|
||||
{children}
|
||||
</ul>
|
||||
</ListDepthContext.Provider>
|
||||
@@ -95,7 +95,7 @@ function MarkdownOrderedList({
|
||||
<ListDepthContext.Provider value={depth + 1}>
|
||||
<ol
|
||||
start={start}
|
||||
className="m-0 mt-2 list-decimal space-y-1 pl-5 first:mt-0"
|
||||
className="m-0 mt-1 list-decimal space-y-0.5 pl-5 first:mt-0"
|
||||
>
|
||||
{children}
|
||||
</ol>
|
||||
@@ -111,8 +111,8 @@ function MarkdownParagraph({ children }: { children?: ReactNode }) {
|
||||
paragraphPosition === 'first'
|
||||
? 'inline'
|
||||
: paragraphPosition === 'continuation'
|
||||
? 'mt-2'
|
||||
: 'mt-2 first:mt-0'
|
||||
? 'mt-1'
|
||||
: 'mt-1 first:mt-0'
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
@@ -128,8 +128,8 @@ function StreamingMarkdownParagraph({ children }: { children?: ReactNode }) {
|
||||
paragraphPosition === 'first'
|
||||
? 'inline'
|
||||
: paragraphPosition === 'continuation'
|
||||
? 'mt-2'
|
||||
: 'mt-2 first:mt-0'
|
||||
? 'mt-1'
|
||||
: 'mt-1 first:mt-0'
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user