erusev / parsedown

Better Markdown Parser in PHP

Home Page:https://parsedown.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bullet points shouldn't end in the middle of code blocks

skeets23 opened this issue · comments

This does not render correctly:

- Here is some code within this bullet point:
```
Code line #1

skipped one line (but this should still be in the code block)
```

This should be outside the code block

The li element is getting terminated on the blank line in the fenced code block, which also terminates the code block, which destroys the rendering for everything after that point.

While what you're expecting does match with CommonMark, it requires a different parsing strategy than Parsedown currently uses to detect this case, so this is a won't fix unfortunately: #707.

If you indent your code block by two spaces (to line up with the text in the list), then this will render in the way you're expecting.