This is a pure OCaml parser for a non-standard dialect Markdown. It was originally written for Ocsigen but may be useful in other contexts too.
The recommended way to install ocaml-markdown is via the opam package manager:
$ opam install markdown
- API documentation is available online.
The main differences of ocaml-markdown
dialect with the markdown standard are:
{{
and}}
are used to surround code blocks- Leading
!
are used for headings, the count defines the heading level #
are used for ordered list
For example the following Markdown text:
# Heading 1
let f x y = x + y
Heading 2
---------
1. first element
2. second element
This text should be written the following way:
! Heading 1
{{
let f x y = x + y
}}
!! Heading 2
# first element
# second element