PHP Markdown has a similar although less problematic bug, where it
only double any blank line in code blocks inside list items. It's a
bug caused by `doList` adding blank lines as a way to help
`processListItems` know if the tailing item needs to be wrapped in a
paragraph.

Ironically, I just fixed that yesterday after the released PHP
Markdown 1.0.1e (so the fix isn't published yet). I noticed it while
reading the HTML version of the PHP Markdown release notes I put
online yesterday, and I remember having noticed it before too.

The fix involves changing the regular expression in
`processListItems` so that it doesn't require the additional newlines
by adding a look-ahead at the right place, so that `doList` can stop
doubling blank lines.

Obviously, there's something else at work in the Perl version that
cause the nested code block to appear.