Markdown Formatter incorrectly parses lists
Originally I wanted to raise a bug about the markdown formatter wrongly interpreting a list sub item as code, because it ignored the double identation instead of single identation for code in lists.
But while building a proper example to reproduce the behavior easily I found that the whole list parsing (for both ordered and unordered lists) is borked.
While I would like to be able to provide exact directions to what exactly is wrong here, the more I played around with this, the more confused I got.
What I can tell for almost certain is that blank lines are at the core of this issue. Normally items should be wrapped in <p> tags when seperated by blank lines, but here (at least for unordered list items in ordered list items) instead the current ordered list is interpreted as ended and a new ordered list started.
I used the official syntax from https://daringfireball.net/projects/markdown/syntax#list as reference, which describes behavior conflicting with what Redmine produces currently.
1. this is a list item with two child items. - first child - second child wrongly interpreted as code 1. another item in the same list. - text wrongly interpreted as ordered list item 1. last item of the ordered list
Expected Output (taken form Marxico)
Output from Redmine's inbuilt Markup Parser
#6 Updated by Marius BALTEANU about 1 year ago
- File expected_m.png added
- Status changed from Needs feedback to Confirmed
The real issue here is that the "- text wrongly interpreted as ordered list item" is interpreted as ordered list item instead of unordered. I'm going to report this issue to the redcarpet gem team because is not generated by Redmine.
Regarding the " - second child wrongly interpreted as code" it not quite an issue because of the blank line that precedes this line and the same behaviour is also on the marxico.