开发者

How to create an OL immediately after an UL with markdown?

开发者 https://www.devze.com 2023-03-03 13:34 出处:网络
I wonder if it\'s possible to create two consecutive lists in markdown without them being merged automatically:

I wonder if it's possible to create two consecutive lists in markdown without them being merged automatically:

Example:


  • a
  • b
  1. x
  2. y

The following markdown doesn't work since it puts the second list inside the last element of the first list:

* a
* b

1. x
2. y

Demo:


  • a
  • b

    1. x
    2. y

While any solut开发者_JAVA百科ions are welcome, I'd prefer one working with python-markdown.


The easiest and cleanest way that I found is adding a comment between lists:

* a
* b

<!-- -->

1. x
2. y

Here is a working example in stackoverflow's markdown:

  • a
  • b
  1. x
  2. y

However, it's sad that this bugs occurs: someone must go and fill the bugs for it for different markdown implementations.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号