RFC: Lazy syntax for paragraphs, blockquotes and lists

Michel Fortin michel.fortin at michelf.com
Fri Sep 3 08:13:23 EDT 2010


Le 2010-09-03 à 5:43, Thomas Leitner a écrit :


> Note that kramdown would generate two separate blockquotes if they are

> separated by a blank line (Markdown.pl merges the blockquotes):

>

>> This is one blockquote with

> a long line.

>

>> This is another blockquote

> with a long line.

>

> If you run the example BQ1 to BQ5 through Markdown.pl, you will find

> that it produces the expected output (as defined above). This is no

> coincidence, I think, since Markdown.pl has been designed with email

> messages in mind. However, the requirements as stated above

> haven't been written down anywhere (at least I don't know of it) and

> with those the behaviour of Markdown.pl is easily explained.


This last example is quite similar to the example of a lazy blockquote in the Markdown syntax page. It states:


> 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.


<http://daringfireball.net/projects/markdown/syntax#blockquote>

Considering the first line of this example in the spec says "this is a blockquote with two paragraphs" and that it follows a non-lazy example where all this text is part of a single blockquote, I wouldn't consider the spec ambiguous. The Markdown syntax description is ambiguous about a lot of things, but not about this one.

Most Markdown implementations, but not all, do it as Markdown.pl: <http://babelmark.bobtfish.net/?markdown=%3E++This+is+one+blockquote+with%0D%0A+++a+long+line.%0D%0A%0D%0A%3E++This+is+another+blockquote%0D%0A+++with+a+long+line.%0D%0A&normalize=on&src=1>

This isn't a disapproval of how you're planning to do things. I just wanted to make it clear that your last example with two consecutive blockquoted paragraphs is clearly a single blocquote per the Markdown syntax description.

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





More information about the Markdown-Discuss mailing list