+++ Vitaly Puzrin [Oct 30 14 02:11 ]:
Blocks can’t be hacked in safe manner, and require good support at parse phase. I think, we have everything to declare those without pain. Fenced blocks are investigated and covered very well. We need only to invent alternate marker and declare “parseable fenced blocks”
I’m not yet sold on the idea that these should be fenced blocks, as opposed to side-marked (whether by overloading blockquotes, or by introducing another side marker).
You raise the issue of long blocks. But there is also a problem with fences for long blocks, which is that it’s easy to lose track of the fact that you’re in a special kind of section. With side-marking, there is a constant reminder of the scope of the section.
In addition, with fences, as Fletcher Penny pointed out on the markdown-discuss group, deleting one line can radically change the meaning of huge parts of the document. Side-marking is more “local.”
I think the biggest argument for fenced code blocks (when we originally introduced them on the markdown-discuss list) was that indented code blocks are inconvenient for cutting and pasting code (either from a program to the markdown document, or in the reverse direction). That consideration doesn’t apply as much to generic block containers. Generic block containers do seem to me to be a generalization of blockquotes. So, using side-marking for them seems more in the spirit of Markdown than introducing fences. It would be more consistent with the rest of the syntax.
It is interesting to compare the main competitors, AsciiDoc and reSructuredText. AsciiDoc uses fences:
.A NOTE admonition block
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
. Fusce euismod commodo velit.
. Vivamus fringilla mi eu lacus.
.. Fusce euismod commodo velit.
.. Vivamus fringilla mi eu lacus.
. Donec eget arcu bibendum
nunc consequat lobortis.
reStructuredText uses indentation to determine the scope of the block container:
.. note:: This is a note admonition.
This is the second line of the first paragraph.
- The note contains all indented body elements
- It includes this bullet list.
Interestingly, in both cases the method used aligns with the approach to blockquotes. In AsciiDoc blockquotes are fenced; in reStructuredText they are indented blocks. (It may be that you prefer the AsciiDoc approach…but then, why not just use AsciiDoc?)
The main complaints that have been raised against blockquote-style syntax are (a) that it is a pain to write and (b) that it is hard to read. I see why one might worry about these things, but (a) is completely solved if you use a decent text editor, and I’m just not sure that the difference in readability (b) is all that great. As I pointed out above, the presence of the side markers reminds you that you’re in a special section, which you might otherwise lose track of in a longer section, so there’s a way in which it increases readability. (In a published book special sections are often put in a box with a different background color or font.)
I’m not at all decided on this issue; I’m just explaining why I don’t find it an easy one.