package cmarkit
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=d65ee4d62b2209fa06c2e30d2ff555636d176dcfebea5695a7d1c0aae965b5c3fb6cca57ab5b8d663d0c544ab0e646970b41b42af82ea16d6fa2c426161f2934
Description
Cmarkit parses the CommonMark specification. It provides:
-
A CommonMark parser for UTF-8 encoded documents. Link label resolution can be customized and a non-strict parsing mode can be activated to add: strikethrough, LaTeX math, footnotes, task items and tables.
-
An extensible abstract syntax tree for CommonMark documents with source location tracking and best-effort source layout preservation.
-
Abstract syntax tree mapper and folder abstractions for quick and concise tree transformations.
-
Extensible renderers for HTML, LaTeX and CommonMark with source layout preservation.
Cmarkit is distributed under the ISC license. It has no dependencies.
Homepage: https://erratique.ch/software/cmarkit
README
cmarkit — CommonMark parser and renderer for OCaml
v0.1.0
Cmarkit parses the CommonMark specification. It provides:
A CommonMark parser for UTF-8 encoded documents. Link label resolution can be customized and a non-strict parsing mode can be activated to add: strikethrough, LaTeX math, footnotes, task items and tables.
An extensible abstract syntax tree for CommonMark documents with source location tracking and best-effort source layout preservation.
Abstract syntax tree mapper and folder abstractions for quick and concise tree transformations.
Extensible renderers for HTML, LaTeX and CommonMark with source layout preservation.
Cmarkit is distributed under the ISC license. It has no dependencies.
Homepage: https://erratique.ch/software/cmarkit
Installation
cmarkit can be installed with opam
:
opam install cmarkit
opam install cmarkit cmdliner # For the cmarkit tool
If you don't use opam
consult the opam
file for build instructions.
Documentation
The documentation can be consulted online or via odig doc cmarkit
.
Questions are welcome but better asked on the OCaml forum than on the issue tracker.
Sample programs
The cmarkit
tool parses and renders CommonMark files in various ways.
See also bench.ml
and the doc examples.
Acknowledgements
A grant from the OCaml Software Foundation helped to bring the first public release of cmarkit
.
The cmarkit
implementation benefited from the work of John MacFarlane (spec, cmark
) and Martin Mitáš (md4c
).
Dependencies (4)
-
topkg
build & >= "1.0.3"
-
ocamlbuild
build
-
ocamlfind
build
-
ocaml
>= "4.14.0"
Used by (4)
-
hilite
>= "0.4.0"
- slack
- yocaml_cmark
- yocaml_cmarkit
Conflicts (1)
-
cmdliner
< "1.1.0"