开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜