Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 solutions are welcome, I'd prefer one working with python-markdown.

like image 987
ThiefMaster Avatar asked May 08 '11 10:05

ThiefMaster


1 Answers

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.

like image 93
kizu Avatar answered Sep 21 '22 06:09

kizu