package cmarkit
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha512=4f0be18c1a16265710d20b85e48b3f8d8632dd708f413264f2a3b7653a860fd80440b81dc40f5ec63d63411705ae389bb07bdb74365e277bec24895b44ba8a0a
    
    
  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.4.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 toolIf 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.1.0" - 
  
    ocamlbuild
  
  
    
build - 
  
    ocamlfind
  
  
    
build - 
  
    ocaml
  
  
    
>= "4.14.0" 
Used by (11)
- 
  
    builder-web
  
  
    
>= "0.2.0" - 
  
    camyll
  
  
    
>= "0.4.4" - graft
 - 
  
    hilite
  
  
    
>= "0.4.0" - odoc-md
 - quill
 - slack
 - 
  
    stone
  
  
    
>= "0.6" - yocaml_cmark
 - yocaml_cmarkit
 - 
  
    yocaml_markdown
  
  
    
>= "2.4.1" 
Conflicts (1)
- 
  
    cmdliner
  
  
    
< "2.0.0"