language-haskell icon indicating copy to clipboard operation
language-haskell copied to clipboard

Literate Haskell grammar (markdown-unlit variant)

Open dbaynard opened this issue 8 years ago • 1 comments

The literate haskell syntax highlighting on github, does not work for files using the markdown-unlit syntax.

The bulk of the file should be parsed as markdown, except anything between one of

```haskell
~~~haskell
``` { .haskell }
~~~ { .haskell }

and one of

```
~~~

which should be parsed and highlighted as haskell.

Example (and another which uses latex style code blocks).

I'm unfamiliar with the entire process, and don't use atom, but I would quite like to see these lhs files highlighted correctly on github. I'm happy to help, though.

dbaynard avatar May 05 '17 16:05 dbaynard

There's a problem. Historically, lhs is LaTeX with Haskell sprinkled in, not Markdown. So literate Haskell grammar assumes TeX. It's not complicated to write another grammar, now for github-flavored Markdown, but I don't know how to disambiguate it from LaTeX-based literate Haskell. Any suggestions?

lierdakil avatar Jul 02 '17 22:07 lierdakil