Skip to content

How can I use a hard line break in markdown? #482

Discussion options

You must be logged in to vote

改成mdx,然后用下面标签包裹起来。

<div style={{ whiteSpace: "pre-line"}}>
第一行
第二行
</div>

大概这样子,虽然简单,但却费了不少功夫才实现,主要是一直问ai问得好烦。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dongrentianyu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant