1. cmark
    1. Description
    2. Installation
    3. API
    4. Example
    5. Source code / Issues


CHICKEN Scheme bindings to the cmark C library. CommonMark is a more highly specified version of Markdown, including most the niceties found in modern Markdown parsers.


You must also install, since the egg uses the shared library - If your package manager doesn't provide a cmark package, you can install from source using the usual "make && make install" dance.


[procedure] (commonmark->html str #!key (safe #t))

Converts a CommonMark string to a HTML string. By default, any raw HTML code blocks or unsafe links (eg, "javascript:...") will be removed. If you'd like to use inline HTML, set the keyword parameter 'safe' to #f.


(use cmark)

(commonmark->html "# Hello world!")

;; for embedded HTML support, turn off safe mode:
(commonmark->html "<script>alert('hello');</script>" safe: #f)

Source code / Issues