Block quotes with a blank line between them get merged

Michel Fortin michel.fortin at michelf.com
Wed Oct 18 09:43:37 EDT 2006


Le 18 oct. 2006 à 9:19, Waylan Limberg a écrit :


> For whatever it is worth, both perl and php have this behavior while

> python gives the expected output. I'd certainly say it is a bug. One

> could very easily have a legitimate need to have two separate quotes

> (perhaps from different sources) follow each other in a document.


I don't see that as a bug; I think it's the intended behaviour. This
is what the syntax description has to say [about blockquotes][1]:


> Markdown allows you to be lazy and only put the `>` before the first

> line of a hard-wrapped paragraph:

>

> > This is a blockquote with two paragraphs. Lorem ipsum dolor

> sit amet,

> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.

> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae,

> risus.

>

> > Donec sit amet nisl. Aliquam semper ipsum sit amet velit.

> Suspendisse

> id sem consectetuer libero luctus adipiscing.


[1]: http://daringfireball.net/projects/markdown/syntax#blockquote

Of course, it can be debated if this is desirable or not, but both
PHP Markdown and Perl Markdown are coherent with the syntax
description. My personal take is that it would be better to require a
`>` on the blank line between the two paragraphs, but changing that
would probably break some people's text.

As a workaround, you can insert an HTML comment between the two
blockquotes. It'd be nice too if three consecutive blank lines would
clear the blockquote.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/




More information about the Markdown-Discuss mailing list