original) (raw)
Nested one-liners broken with md_in_html · Issue #1074 · Python-Markdown/markdown (Version 3.3.3. I've found several anomalies in the behavior of nested markdown=1 blocks. Here's one that's probably diagnostic:
markdown.markdown('<div class="outer" markdown="block"><div class="inner" markdown="block">*foo*</div></div>', extensions=["extra"])
returns:
'<p><div class="inner" markdown="block"><div class="outer" markdown="block">*foo*</div></p>\n</div>'
The inner <div>
is now outside.
Other weird things in this example are the addition of the <p>
tags, which are unmatched, and a stray \n
.