fix: markdown paragraph margin (#8289)

This commit is contained in:
zxhlyh 2024-09-12 11:28:14 +08:00 committed by GitHub
parent ec57922bb6
commit 0bb7569d46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 11 deletions

View File

@ -198,11 +198,11 @@ const Paragraph = (paragraph: any) => {
return (
<>
<ImageGallery srcs={[children_node[0].properties.src]} />
<div>{paragraph.children.slice(1)}</div>
<p>{paragraph.children.slice(1)}</p>
</>
)
}
return <div>{paragraph.children}</div>
return <p>{paragraph.children}</p>
}
const Img = ({ src }: any) => {

View File

@ -321,18 +321,12 @@
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 24px;
margin-bottom: 16px;
padding-top: 12px;
margin-bottom: 12px;
font-weight: var(--base-text-weight-semibold, 600);
line-height: 1.25;
}
.markdown-body p {
margin-top: 0;
margin-bottom: 10px;
}
.markdown-body blockquote {
margin: 0;
padding: 0 8px;
@ -449,7 +443,7 @@
.markdown-body pre,
.markdown-body details {
margin-top: 0;
margin-bottom: 16px;
margin-bottom: 12px;
}
.markdown-body blockquote> :first-child {