package omd

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A markdown parser in OCaml.

type attributes = (string * string) list
type list_type =
  1. | Ordered of int * char
  2. | Bullet of char
type list_spacing =
  1. | Loose
  2. | Tight
and '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
type 'attr def_elt = {
  1. term : 'attr inline;
  2. defs : 'attr inline list;
}
type '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
type doc = attributes block list

A markdown document

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

Innovation. Community. Security.