package omd
A Markdown frontend in pure OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
omd-2.0.0.alpha3.tbz
sha256=278e8e5409954bee919ac853909f97061f954e728cbdb241466c235cb741377c
sha512=51c1ca573bd8e20e100788db575f3bee3c2ef61f0cf5c83fb5b67e193d2c87a223ae4a5776b1f3fe85f024cddf85bbe3e1f10988c38a88ae7304a282fd81825a
doc/omd/Omd/index.html
Module Omd
A markdown parser in OCaml
The document model
The following types define the AST representing Omd's document model.
type !'attr block =
| Paragraph of 'attr * 'attr Omd__.Ast_inline.inline
| List of 'attr * Omd__.Ast_block.List_types.list_type * Omd__.Ast_block.List_types.list_spacing * 'attr block list list
| Blockquote of 'attr * 'attr block list
| Thematic_break of 'attr
| Heading of 'attr * int * 'attr Omd__.Ast_inline.inline
| Code_block of 'attr * string * string
| Html_block of 'attr * string
| Definition_list of 'attr * 'attr def_elt list
| Table of 'attr * ('attr Omd__.Ast_inline.inline * Omd__.Ast_block.Table_alignments.cell_alignment) list * 'attr Omd__.Ast_inline.inline list list
(*A table is represented by a header row, which is a list of pairs of header cells and alignments, and a list of rows
*)
type doc = attributes block list
Helper functions for constructing the document AST
Generating and constructing tables of contents
Helper functions
Perform escaping of HTML entities. Turns: '"'
into """
, '&'
into "&"
, '<'
in "<"
and '>'
into ">"
Converting to and from documents
val of_channel : in_channel -> doc
val of_string : string -> doc
val to_html : ?auto_identifiers:bool -> doc -> string
val to_sexp : doc -> string
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page