erusev / parsedown

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

Colating ordered and unordered lists indent incorrectly #753

Open mxgl opened 4 years ago

mxgl commented 4 years ago

When mixing ordered and unordered lists, indentation happens incorrectly.

When switching list types an extra layer of indentation occurs that shouldn't.

Indentation should be based on whitespace rather than the previous list item's type

It appears this was intended to have been fixed in #437, but is broken again.

1. Sample
2. List Item
    * A Sublist
    1. Now we order
    1. a list of things
    * Same level sublist
        1. Deeper we go

Parsedown's interpretation image

Commonmark's interpretaion permalink image

Live on Github:

  1. Sample
  2. List Item
    • A Sublist
      1. Now we order
      2. a list of things
    • Same level sublist
      1. Deeper we go