Consecutive code blocks

David Chambers david.chambers.05 at gmail.com
Fri Apr 15 16:33:19 EDT 2011


I agree that in most cases it's appropriate to include content between two
code blocks. In certain cases, though, such as here where I'm presenting an
HTML snippet with accompanying CSS, there's no need to do so.

The fact that Markdown uses significant trailing whitespace for line breaks
sets a precedent, and makes doing so elsewhere feel slightly less wrong. :)

I'm planning to write extensions for the Markdown implementations I use. The
Markdown example provided parsed *without* such an extension will result in
a single `<pre>`, a totally acceptable fallback.

David


On 15 April 2011 07:30, Dr. Drang <drdrang at gmail.com> wrote:


> The short answer, in my experience, is no. When I've wanted to do

> something like that on my blog, I've rewritten it so I can put a

> little noncode (e.g., "Therefore," "And," "Later in the file") between

> the two code snippets.

>

> I suspect that a blank, unindented line between blocks doesn't create

> two code sections because it's impossible to visually distinguish

> between a between a blank line in the code and a blank line separating

> two bits of code. The only place where Markdown does something similar

> is with two (or more) spaces at the end of a line generate, a

> construct that can generate inadvertent <br /> tags.

>

> Dr. Drang

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20110415/fe944c26/attachment.html>


More information about the Markdown-Discuss mailing list