Closed sslepian closed 9 years ago
Hmm... yes. This look like a bug. THanks for reporting!
I have similar issue
I have following markdown:
2. XYZ
1. A
- XYZ
- XYZ
- XYZ
Lorem ipsum...
2. B
- XYZ
- XYZ
- XYZ
As you see, GitHUB (and other MarkDown editors I checked) render this as follows:
XYZ
A
Lorem ipsum...
Unfortunately, this library treats first sub-sub list (and the Lorem Ipsum) as code block. What's more, it restarts list numbering for sub-list (A,B).
The list parser has errors in the parsing rules. These showed up for loose sub-items because not all relevant text was collected for recursive parsing of sub-item elements. Pull request posted.
Pegdown appears to render nested ordered lists incorrectly, which breaks the list numbering for the child lists.
For the following Markdown
Here's the HTML output by John Gruber's Markdown test site:
http://jsfiddle.net/u7GJt/
And here's the HTML output of Pegdown:
http://jsfiddle.net/qTDs6/
Pegdown's output is breaking the inner list into two separate
tags, which breaks list numbering.