Flat code block syntax

John MacFarlane jgm at berkeley.edu
Wed Oct 10 10:25:54 EDT 2007


+++ Michel Fortin [Oct 09 07 22:41 ]:

> As for other possibilites, here are a few alternates I've found by looking

> at my keyboard which would be usable (I think) within Markdown:

>

> !!!

> code

> !!!

>

> @@@

> code

> @@@

>

> %%%

> code

> %%%

>

> Bruce Phillips' suggestion:

>

> :::

> code

> :::


Of these alternatives to ~~~, I prefer the ::: syntax. But I think the
~~~ looks a bit cleaner. Another alternative would be to offer both
syntaxes.

It might also be worth looking at AsciiDoc's approach.
http://www.methods.co.nz/asciidoc/userguide.html#_delimited_blocks
AsciiDoc offers a variety of different delimited blocks that behave
differently. I can see the point of having delimited blocks that
preserve spacing and line breaks but otherwise interpret the text within
as markdown, not code. These could be used for addresses, verse, etc.
Granted, in markdown you can put two spaces at the end of each line, but
that is less explicit, more error-prone, etc.

John



More information about the Markdown-Discuss mailing list