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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lists not rendering as expected after a paragraph

emmaindal opened this issue · comments

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!

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.