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
and inline = {
  1. il_desc : inline_desc;
  2. il_attributes : attributes;
}
and inline_desc =
  1. | Concat of inline list
  2. | Text of string
  3. | Emph of inline
  4. | Strong of inline
  5. | Code of string
  6. | Hard_break
  7. | Soft_break
  8. | Image of link
  9. | Html of string
type list_type =
  1. | Ordered of int * char
  2. | Bullet of char
type list_spacing =
  1. | Loose
  2. | Tight
type def_elt = {
  1. term : inline;
  2. defs : inline list;
}
and block = {
  1. bl_desc : block_desc;
  2. bl_attributes : attributes;
}
and block_desc =
  1. | Paragraph of inline
  2. | List of list_type * list_spacing * block list list
  3. | Blockquote of block list
  4. | Thematic_break
  5. | Heading of int * inline
  6. | Code_block of string * string
  7. | Html_block of string
  8. | Definition_list of def_elt list
type doc = block list

A markdown document

val of_channel : in_channel -> doc
val of_string : string -> doc
val to_html : doc -> string
val to_sexp : doc -> string
OCaml

Innovation. Community. Security.