contentdb icon indicating copy to clipboard operation
contentdb copied to clipboard

Incorrect markdown rendering of code block in list item

Open fgaz opened this issue 2 years ago • 1 comments

Summary

In a mod's readme, this code

* item
  ```
  line 1
  line 2
  ```

results in inline code like this:

  • item line 1 line 2

instead of

  • item
    line 1
    line 2
    
Steps to reproduce

Encountered here (Settings section). Correct rendering here

edit: I changed the markdown in contentdb to have a better rendering, but the upstream markdown still triggers the bug

fgaz avatar Dec 20 '22 13:12 fgaz

There is supposed to be a blank line between the text and the code block, but ContentDB also doesn't support that

rubenwardy avatar May 19 '23 19:05 rubenwardy

I suppose this was closed because it's an upstream issue. Do you know if there is a ticket about it in the upstream tracker?

fgaz avatar Jun 07 '24 07:06 fgaz

This is intended behaviour by the python markdown parser as markdown requires blank lines between blocks

I'm planning on moving away from python markdown to something a bit less strict, see #537

rubenwardy avatar Jun 07 '24 09:06 rubenwardy