markdown: some lines are lost in verbatim blocks inside a list #2507
Open
Description
The markdown
module loses some lines from verbatim blocks inside list items. As far as I can tell, it happens only when the number of non-whitespace characters in the line is equal to the indentation level.
For example, if the indentation uses 4 spaces, 4 letter lines are cut:
* 4 spaces, `asdf` and `tab.` are lost
~~~
a
as
asd
asdf
tab.
asdfg
~~~
And the nitmd
output, notice the blank lines:
<ul>
<li><p>4 spaces, <code>asdf</code> and <code>tab.</code> are lost</p>
<pre><code>a
as
asd
asdfg
</code></pre>
</li>
</ul>
The same thing happens with a 2 spaces indentation:
* 2 spaces, `as` is lost
~~~
a
as
asd
asdf
~~~
And the nitmd
output:
<ul>
<li><p>2 spaces, <code>as</code> is lost</p>
<pre><code>a
asd
asdf
</code></pre>
</li>
</ul>
I get this behavior with nitmd
and when using the markdown
module directly.