erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.76k stars 1.12k forks source link

List after list #730

Open Jax-p opened 4 years ago

Jax-p commented 4 years ago

I would like to create list ul after list ul but parsedown merges it into the one list. Like this:

As you can see it acts same as GitHub parser but CodeMirror and parser in PhpStorm creates 2 lists instead of 1. Is there any way how to create two lists instead of one?

ghost commented 4 years ago

Use an asterisk to denote a list for the first list, use a hyphen to denote the second list.

* List 1
* List 1

- List 2
- List 2

It will render as 2 lists and the html code will also be 2 lists. I have setBreaksEnabled set to true in my php file.

aidantwoods commented 4 years ago

Is is a generic issue in CommonMark too, which suggests separating lists with an invisible block (blank HTML comment):

To separate consecutive lists of the same type, or to separate a list from an indented code block that would otherwise be parsed as a subparagraph of the final list item, you can insert a blank HTML comment:

- foo
- bar

<!-- -->

- baz
- bim