John MacFarlane | 3 Sep 01:26 2013

Fw: Re: On Markdown in Haddock and why it's not going to happen

+++ Mateusz Kowalczyk [Sep 02 13 21:34 ]:
> On 02/09/13 19:43, John MacFarlane wrote:
> > When the proposal was first being discussed, I suggested that instead of
> > adding markdown support to haddock, one might enhance the existing
> > haddock markup, making it more expressive, so that it could encode the same
> > range of structural features as markdown.  If I'm not mistaken, currently
> > haddock doesn't allow list items with multiple paragraphs or other block
> > elements, or nested lists, or images, or blockquotes.  
> Paragraph level elements are indeed not allowed in lists. The list
> contents are currently (that is, on my working branch) allowed to be:
> monospace (delimited by  <at> ), anchors, identifiers, module names,
> pictures, URLs, bold, emphasis, HTML escape codes, regular strings. Note
> that if a monospaced string is the only element of the list content, it
> gets turned into a code block.
> I'm not sure what you mean by block elements.

I mean things like paragraphs, blockquotes, code blocks, other lists.

In markdown you can have a list item that contains these things:

1.  This is my first list item.

    Second paragraph of first list item. Some code:

        foo = bar <$> baz <*> 2.0

2.  This is my second list item.

    * Sublist item one
(Continue reading)