Flat code block syntax (was seemingly no good way to end bulleted list and start code block)
Waylan Limberg
waylan at gmail.com
Sun Oct 7 23:41:09 EDT 2007
Figures, I respond to the old discussion, then see the new one. Oh
well, Micheal covered my points in more detail here.
On 10/7/07, John MacFarlane <jgm at berkeley.edu> wrote:
[snip]
> On (b): Non-extended markdown parsers will make a mess of the
> new code blocks with either syntax, since they won't know to interpret
> the text between ~~~ as verbatim text. I don't see a big advantage
> here for the ~~~ syntax.
Well, with Michael's proposed indentation rules, the code could still
be indented if it's ever expected to be feed to non-extended parsers.
The only difference being that you lose two consecutive blocks. But
with the two snippets wrapped in tildes (or whatever we go with) it
should be clear to the reader that they are separate. I think this is
reason enough to keep the proposed indentation options.
[snip]
> One more thought. I think it would be useful to allow something like
> this:
>
> ~~~(haskell)~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> inlineNote = try $ do
> failIfStrict
> char '^'
> contents <- inlinesInBalanced "[" "]"
> return $ Note [Para contents]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
I like it. Much better than the solution I currently have implemented
for python [1].
[1]: http://achinghead.com/markdown/codehilite/
--
----
Waylan Limberg
waylan at gmail.com
More information about the Markdown-Discuss
mailing list