Skip to content

Commit

Permalink
调整文章行距
Browse files Browse the repository at this point in the history
  • Loading branch information
barkure committed Dec 11, 2023
1 parent 39d70e7 commit 77013d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Article.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const Article = () => {
<ReactMarkdown
className="ReactMarkdown"
children={articleContent} // 文章内容
rehypePlugins={[rehypeHighlight, rehypeRaw]} // 代码高亮
rehypePlugins={[rehypeHighlight, rehypeRaw]} // 代码高亮,解析html标签
remarkPlugins={[gfm]} // 使用remark-gfm
components={{
img(props) {
Expand Down
4 changes: 4 additions & 0 deletions src/components/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,8 @@
.ReactMarkdown th, .ReactMarkdown td {
border: 1px solid black;
padding: 10px;
}

.ReactMarkdown p {
line-height: 1.6; /* 设置行高 */
}

0 comments on commit 77013d1

Please sign in to comment.