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

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

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


当前回答

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

# 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

其他回答

我测试了很多Markdown实现。不间断空格ASCII字符&nbsp;(后面跟着一个空行)将给出一个空行。重复这一对就可以了。到目前为止,我还没有挂过科。

例如:

 

 

你好

 

 

世界!

 

 

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

而不是:

text
(space)(space)
more text

我做了:

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

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

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

它看起来不错Markdown来源:

text1 text1
` `  
` `  
text2 text2
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>

新建,三空行。古德勒克

&nbsp;

这个HTML实体的意思是“非换行空格”将帮助您处理每个换行符