ticket id
000035
status
closed
priority
???
assigned to
Waylan
Reported by: Mikael Garde Nielsen
Component:

(This report comes from a list discussion as reported by Mikael Garde Nielsen.)

When parsing a list item (as the first item in a list) which starts with five spaces after the asterisk, Markdown crashes with an IndexError in the blockparser.

>>> markdown.markdown('*     list')
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
...
--> 295                 self.parser.parseBlocks(lst[-1], [item])
IndexError: child index out of range

Additionally, when an item with five spaces it not the first item in a list, the output is weird/incorrect:

>>> markdown.markdown('* one\n*     five')
<ul>
<li>one<p>five</p>
</li>
</ul>

As opposed to:

>>> markdown.markdown('* one\n*    four')
<ul>
<li>one</li>
<li>four</li>
</ul>

Loose lists are also interesting:

>>> markdown.markdown('* one\n\n*     five\n')
<ul>
<li>
<p>one</p>
</li>
<li>
<pre><code>five
</code></pre>
</li>
</ul>

It could be argued that that is correct, but Babelmark disagrees (see http://babelmark.bobtfish.net/?markdown=*+one%0D%0A%0D%0A*+++++five).

Resolution

fixed

Powered by Sputnik | XHTML 1.1