[ocaml-infra] markdown in "pure" OCaml

Philippe Wang philippe.wang at cl.cam.ac.uk
Thu Jul 25 16:46:28 BST 2013


Dear all,

discussions that occurred earlier this month on this list seemed to point out that a markdown front-end for OCaml would be welcome and useful, provided it'd be closer to some existing broadly-used flavour of Markdown, and especially if it's implemented in pure OCaml ("pure" in the sense of "free from ~inconvenient~ dependencies").

Since we need to have a markdown parser for the new version of ocaml.org anyway, I looked at what options we had.
Basically, several, if not most, Markdown front-ends in OCaml seem to be based on Mauricio's and none of them are very close to a "mainstream" Markdown flavour. And that's pretty much it. (Am I wrong?)

I'm currently writing a markdown front-end in pure OCaml (only .ml files). It's a pattern-matching based implementation. It will be kept close to the github flavour markdown. (Sorry, I will probably refuse to reproduce their bugs: I will either replace them by my own bugs or I'll fix them.)

So far, it seems to me that the trickiest part is to have a "correct" parsing of lists, as no list is wrong in markdown syntax since *nothing* is wrong in markdown.

I use a public github repo to synchronise between my several machines:
https://github.com/pw374/omd/
Beware, it's at an early stage, which (partly) explains why my commit logs are unreadable.

I expect to have a working markdown-->html tool in a few days (I believe the hardest part has been done).

I'll put (old-fashioned tar-balls) snapshots in the github repo when it starts working.

I'll come back to you soon,
Cheers,
Philippe Wang





More information about the Infrastructure mailing list