Markdown rendered incorrectly when code block is inside nested list
Summary
A code block within a nested list causes GitLab's Markdown renderer to incorrectly render the nested list items as code blocks.
Steps to reproduce
Try this Markdown code in a README.md
:
1. Numbered list
* Nested list
Code block inside the nested list
This code block works fine.
* This should be a list item, but GitLab renders it as a code block.
2. This list item works.
Which is rendered as:
-
Numbered list
-
Nested list
Code block inside the nested list This code block works fine.
-
This should be a list item, but GitLab renders it as a code block.
-
-
This list item works.
You can also test that code in GitHub and in commonmark.
What is the current bug behavior?
The nested list item following a code block is considered a code block itself.
What is the expected correct behavior?
The nested list item should have been a list item.