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

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

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


当前回答

如果Markdown编译器支持HTML,可以在Markdown源代码中添加<br/><br/>。

其他回答

&nbsp;

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

你可以用这个来完美地完成:

texttextexttexttext
&nbsp;
&nbsp;
texttexttexttexttext

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

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
&nbsp;
&nbsp;

### 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

我不知道它是否适用于其他编辑器,但在VSCode中,简单的#后跟换行符就可以达到我的目的,并且可以无限重复。(与无输出的反引号不同)

事实上,它是一个空的标题行,所以任何文档大纲或自动格式化都可能看起来很怪异。