package omd

  1. Overview
  2. Docs

Module OmdSource

A markdown parser in OCaml.

Sourcetype attributes = (string * string) list
Sourcetype list_type =
  1. | Ordered of int * char
  2. | Bullet of char
Sourcetype list_spacing =
  1. | Loose
  2. | Tight
Sourceand 'attr inline =
  1. | Concat of 'attr * 'attr inline list
  2. | Text of 'attr * string
  3. | Emph of 'attr * 'attr inline
  4. | Strong of 'attr * 'attr inline
  5. | Code of 'attr * string
  6. | Hard_break of 'attr
  7. | Soft_break of 'attr
  8. | Image of 'attr * 'attr link
  9. | Html of 'attr * string
Sourcetype 'attr def_elt = {
  1. term : 'attr inline;
  2. defs : 'attr inline list;
}
Sourcetype 'attr block =
  1. | Paragraph of 'attr * 'attr inline
  2. | List of 'attr * list_type * list_spacing * 'attr block list list
  3. | Blockquote of 'attr * 'attr block list
  4. | Thematic_break of 'attr
  5. | Heading of 'attr * int * 'attr inline
  6. | Code_block of 'attr * string * string
  7. | Html_block of 'attr * string
  8. | Definition_list of 'attr * 'attr def_elt list
Sourcetype doc = attributes block list

A markdown document

Sourceval of_channel : in_channel -> doc
Sourceval of_string : string -> doc
Sourceval to_html : doc -> string
Sourceval to_sexp : doc -> string
Sourceval headers : ?remove_links:bool -> 'attr block list -> ('attr * int * 'attr inline) list
Sourceval toc : ?start:int list -> ?depth:int -> doc -> doc