michelf/php-markdown — Issue #9: Fenced code inside blockquote followed by fenced code
Author: waylan
Created: 2012-01-25 16:35:38+00:00
State: open

Fenced code blocks inside a blockquote works fine until another fenced code block is included in the document anywhere after the blockquote.

For example:

> ~~~
foo
~~~

~~~
bar
~~~

results in:

~~~
foo

bar
~~~

additionally:

> ~~~
foo
~~~

other stuff between the fenced code blocks

~~~
bar
~~~

does not help:

~~~
foo

other stuff between the fenced code blocks

bar
~~~

If you remove all fenced code blocks after the blockquote, or have every line of the blockquote start with `> ` then the problem goes away.

So this works fine:

> ~~~
> foo
> ~~~

~~~
bar
~~~

As does this:

> ~~~
foo
~~~

Paragraph at end of document

All examples above were tested on the [Dingus](http://michelf.com/projects/php-markdown/dingus/) with PHP Markdown Extra 1.2.5 .