Python-Markdown / markdown

A Python implementation of John Gruber’s Markdown with Extension support.
https://python-markdown.github.io/
BSD 3-Clause "New" or "Revised" License
3.71k stars 856 forks source link

List not rendering correctly when preceded by word #1452

Closed augustelalande closed 5 months ago

augustelalande commented 5 months ago

List are not rendering correctly when preceded by word or sentence.

For example:

list:
* item1
* item2

transcompiles to

<p>list:
* item1
* item2</p>

code to reproduce

html = markdown.markdown("""list:
* item1
* item2
""")

with open('out.html', 'w', encoding='utf-8', errors='xmlcharrefreplace') as f:
    f.write(html)

I don't think this is intentional, but let me know if it is.

Downstream issue: https://github.com/astral-sh/ruff/issues/10427

augustelalande commented 5 months ago

Nevermind duplicate of #1442