我正在添加Markdown支持我的CMS编辑器。

写Markdown内容时,我如何创建两个空行?

我一直在努力,但总是只有一条线。


当前回答

在GitHub Wiki markdown中,我使用散列符号(#),后面跟着两个空格,使换行符变大。它实际上并没有提供多个换行符,但它提供了一个大换行符,很好地满足了我的需求。

而不是:

text
(space)(space)
more text

我做了:

text
(hash mark)(space)(space)
more text

其他回答

您可以重复使用连续空格(U+00a0)和两个空格(U+0020×2)以及换行符(U+000a)的序列来实现这一点。根据您的用例,需要两次或两次以上。

使用(这里不是降价解释,而是)实际的空白字符(理论上是可复制粘贴的):

Preceding
   
   
   
Following.

引号内加空格,后面加两个空格。如需更多行,请重复以下步骤:

text1 text1
`(space)`(space)(space)
`(space)`(space)(space)
text2 text2

它看起来不错Markdown来源:

text1 text1
` `  
` `  
text2 text2

我只知道下面的选项。如果能把它们都列一个清单,并给出不同之处,那就太好了

# RAW
## Creates 2 Lines that CAN be selected as text
## -------------------------------------------------
### The non-breaking space ASCII character
 
 

### HTML <(br)/> tag
<br />
<br />

## Creates 2 Lines that CANNOT be selected as text
## -------------------------------------------------
### HTML Entity &NewLine;
&NewLine;
&NewLine;

### Backticks with a space inside followed by two spaces
`(space)`(space)(space)
`(space)`(space)(space)
#### sample:
` `  
` `

# End

你可以使用<br/><br/>或&nbsp;&nbsp;或者\ \。

&nbsp;<br>
&nbsp;<br>
&nbsp;<br>

新建,三空行。古德勒克