jannschu ยท GitHub

First thank you for this implementation! ๐Ÿ‘

I provide a minimal working example of some unexpected behavior I encountered:

import markdown
md = markdown.Markdown(extensions=['extra'])
html = md.convert("<div markdown><p>Hello _World!_</p></div>")
print(html)

The output was

<div>
<p><p>Hello <em>World!</em></p></p>
</div>

But I expected

<div>
<p>Hello <em>World!</em></p>
</div>

My workaround is to use two line breaks (edit)

html = md.convert("<div markdown>\n\n<p>Hello _World!_</p></div>")

does not include the additional paragraph, but the Markdown is not replaced.

Read the original on github.com โ†—