jgm/pandoc — pull request #832 by stepcut (2013-04-18 18:38:02+00:00)
Title: Initial support for supporting School of Haskell Markdown

Add some support for a School of Haskell markdown extensions. My primary use case is to down-convert pandoc markdown documents to school of haskell compatible documents.

https://www.fpcomplete.com/school/how-to-use-the-school-of-haskell/soh-markdown

School of Haskell markdown is mostly strict markdown with two extensions.

- @@@ fences to 'hide solution'
- ``` style github code blocks

The current github code block parser only supports a single atttribute like:

``` haskell

But School of Haskell (http://www.fpcomplete.org) allows multiple attributes like:

``` haskell active web

This patch adds a new extension

Ext_backtick_code_multi

which could probably be better named. Or, perhaps the normal github parser should be extended to always allow this?

The Markdown Reader has been extended with:

<|> (guardEnabled Ext_backtick_code_multi >> ((\xs -> ("", xs, [])) <$> (identifier `sepBy1` (many1 (char ' ')))))

Which could possibly be improved. The writer has been extended as well.