radude / mdx_truly_sane_lists

Extension for Python-Markdown that makes lists truly sane. Custom indents for nested lists and fix for messy linebreaks and paragraphs between lists.
MIT License
85 stars 10 forks source link

Lists not rendering as expected after a paragraph #7

Open emmaindal opened 3 years ago

emmaindal commented 3 years ago

Hi, we were looking into using this awesome extension for our documentation. One of the main things we wanted to get around is the fact that you in python markdown need an empty line break before the list starts, while you in Github markdown do not.

Visually explained

this markdown:

Screen Shot 2021-10-08 at 4 16 45 PM

should render as this:

Screen Shot 2021-10-08 at 4 16 47 PM

Looking at this test case, it looks like it is expecting the opposite, a list item to not render as a list item, when it has a paragraph above it.

But using your demo site to preview the expected behavior, it renders as I expect it to.

But when we use the extension, we don't get the expected behavior.

Screen Shot 2021-10-08 at 4 24 36 PM

Thanks!

ilyagr commented 1 year ago

This is addressed by https://github.com/adamb70/mdx-breakless-lists.

Note that I had to set truly_sane = false for the two extensions to work well together. Otherwise, this extension sometimes splits a single list in two.