Markdown parser incorrectly parses list items with sublists and multiple paragraphs
The markdown parser incorrectly parses list items which themselves have a sublist and multiple paragraphs, with at least one paragraph following the sublist (still as part of the item).
To see one such case where it fails, look at the source code for the following example which is rendered correctly by the GitHub website:
BUG EXAMPLE:
Scoping
Scoping in tethercode is done using a lexical scope at compile time. The following rules is how an identifier can be resolved (which are checked in that order):
-
The identifier is one of the following:
- the right-hand side of a member access operator, or
- the name of a keyword argument in a function definition or function call, or
- the name of a newly defined reference in a let statement, function definition or class definition
In such a case, it doesn't itself refer to any previously defined independent element and it will not be resolved.
-
This is the second list item. Everything before that should be rendered as part of the first list item. There should be no paragraph of text in between that is not part of the first list item.