Skip to content

Commit

Permalink
fix: markdown paragraph margin
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh committed Sep 12, 2024
1 parent ec57922 commit dee00ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions web/app/components/base/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
12 changes: 3 additions & 9 deletions web/app/styles/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -449,7 +443,7 @@
.markdown-body pre,
.markdown-body details {
margin-top: 0;
margin-bottom: 16px;
margin-bottom: 12px;
}

.markdown-body blockquote> :first-child {
Expand Down

0 comments on commit dee00ad

Please sign in to comment.