降价清单彼此对应 [英] Markdown lists under each other

查看:76
本文介绍了降价清单彼此对应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

* foo
* bar

产生

<ul>
  <li>foo</li>
  <li>bar</li>
</ul>

* foo

* bar

产生

<ul>
  <li><p>foo</p></li>
  <li><p>bar</p></li>
</ul>

我想要的时候

<ul>
  <li><p>foo</p></li>
</ul>
<ul>
  <li><p>bar</p></li>
</ul>

有什么解决方案?

推荐答案

由于大多数markdown实现都支持HTML,因此您可以在两个列表之间使用注释,因此这将是解决此问题的最安全,最干净的方法

Since the majority of markdown implementations support the HTML, you can just use the comment between two lists, so it would be the safest and cleanest possible solution for this issue.

像这样:

* a

<!-- -->

* b

但是,这不会给您<p>,因此,如果您真的需要它们,则需要在此处使用内联HTML.

However, that won't give you the <p>, so if you'd really need them, you'd need to use the inline HTML here.

* <p>a

<!-- -->

* <p>b

(在大多数实现中,您无需在markdown中关闭<p>-它们会被markdown自动关闭)

(in most implementations you won't need to close the <p> in markdown — they would be closed automatically by markdown)

这是第二个使用stackoverflow降价的示例:

Here is a live second example using the stackoverflow's markdown:

  • a

  • b

这篇关于降价清单彼此对应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆