You are looking at historical revision 40827 of this page. It may differ significantly from its current revision.

cmark

Description

Wrapper for native commonmark library. Includes markdown to sxml capabilities. Meant to be a drop in replacement for lowdown.

API

[procedure] (cmark->sxml s)

Convert markdown string to sxml.

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

Convert commonmark markdown to html.

[procedure] (cmark-markdown-to-html markdown content-length options)
[procedure] (cmark-node-free cmark-node-pointer)
[procedure] (cmark-node-next cmark-node-pointer)
[procedure] (cmark-node-previous cmark-node-pointer)
[procedure] (cmark-node-parent cmark-node-pointer)
[procedure] (cmark-node-first-child cmark-node-pointer)
[procedure] (cmark-node-last-child cmark-node-pointer)
[procedure] (cmark-node-get-user-data cmark-node-pointer)
[procedure] (cmark-node-get-type cmark-node-pointer)
[procedure] (cmark-node-get-type-string cmark-node-pointer)
[procedure] (cmark-node-get-literal cmark-node-pointer)
[procedure] (cmark-node-set-literal cmark-node-pointer c-string)
[procedure] (cmark-node-get-heading-level cmark-node-pointer)
[procedure] (cmark-node-set-heading-level cmark-node-pointer int-num)
[procedure] (cmark-node-get-list-type cmark-node-pointer)
[procedure] (cmark-node-set-list-type cmark-node-pointer int-num)
[procedure] (cmark-node-get-list-delim cmark-node-pointer)
[procedure] (cmark-node-set-list-delim cmark-node-pointer int-num)
[procedure] (cmark-node-get-list-start cmark-node-pointer)
[procedure] (cmark-node-set-list-start cmark-node-pointer int-num)
[procedure] (cmark-node-get-list-tight cmark-node-pointer)
[procedure] (cmark-node-set-list-tight cmark-node-pointer int-num)
[procedure] (cmark-node-get-fence-info cmark-node-pointer)
[procedure] (cmark-node-set-fence-info cmark-node-pointer c-string)
[procedure] (cmark-node-get-url cmark-node-pointer)
[procedure] (cmark-node-set-url cmark-node-pointer c-string)
[procedure] (cmark-node-get-title cmark-node-pointer)
[procedure] (cmark-node-set-title cmark-node-pointer c-string)
[procedure] (cmark-node-get-on-enter cmark-node-pointer)
[procedure] (cmark-node-set-on-enter cmark-node-pointer c-string)
[procedure] (cmark-node-get-on-exit cmark-node-pointer)
[procedure] (cmark-node-set-on-exit cmark-node-pointer c-string)
[procedure] (cmark-node-get-start-line cmark-node-pointer)
[procedure] (cmark-node-get-start-column cmark-node-pointer)
[procedure] (cmark-node-end-line cmark-node-pointer)
[procedure] (cmark-node-end-column cmark-node-pointer)
[procedure] (cmark-node-unlink cmark-node-pointer)
[procedure] (cmark-node-insert-before cmark-node-pointer-a cmark-node-pointer-b)
[procedure] (cmark-node-insert-after cmark-node-pointer-a cmark-node-pointer-b)
[procedure] (cmark-node-replace cmark-node-pointer-a cmark-node-pointer-b)
[procedure] (cmark-node-prepend-child cmark-node-pointer-a cmark-node-pointer-b)
[procedure] (cmark-node-append-child cmark-node-pointer-a cmark-node-pointer-b)
[procedure] (cmark-consolidate-text-nodes cmark-node-pointer)
[procedure] (cmark-iter-new cmark-node-pointer)
[procedure] (cmark-iter-free cmark-node-iter-pointer)
[procedure] (cmark-iter-next cmark-node-iter-pointer)
[procedure] (cmark-iter-get-node cmark-node-iter-pointer)
[procedure] (cmark-iter-get-event-type cmark-node-iter-pointer)
[procedure] (cmark-iter-get-root cmark-node-iter-pointer)
[procedure] (cmark-iter-reset cmark-node-iter-pointer)
[procedure] (cmark-parser-new int-num)
[procedure] (cmark-parser-free cmark-parser-pointer)
[procedure] (cmark-parser-feed cmark-parser-pointer c-string size)
[procedure] (cmark-parser-finish cmark-parser-pointer)
[procedure] (cmark-parse-document c-string size options)
[procedure] (cmark-parse-file file)
[procedure] (cmark-render-xml cmark-node-pointer options)
[procedure] (cmark-render-html cmark-node-pointer options)
[procedure] (cmark-render-man cmark-node-pointer int-num options)
[procedure] (cmark-render-commonmark cmark-node-pointer int-num options)
[procedure] (cmark-render-latex cmark-node-pointer int-num options)
[procedure] (cmark-version)
[procedure] (cmark-version-string)

All commonmark constants are exported as well. They are mostly useful internally, but are necessary if writing a new cmark export format. The variables keep the C style formatting from the commonmark library.

[constant] CMARK_OPT_SAFE
[constant] CMARK_OPT_DEFAULT
[constant] CMARK_EVENT_NONE
[constant] CMARK_EVENT_DONE
[constant] CMARK_EVENT_ENTER
[constant] CMARK_EVENT_EXIT
[constant] CMARK_NODE_NONE
[constant] CMARK_NODE_DOCUMENT
[constant] CMARK_NODE_BLOCK_QUOTE
[constant] CMARK_NODE_LIST
[constant] CMARK_NODE_ITEM
[constant] CMARK_NODE_CODE_BLOCK
[constant] CMARK_NODE_HTML_BLOCK
[constant] CMARK_NODE_CUSTOM_BLOCK
[constant] CMARK_NODE_PARAGRAPH
[constant] CMARK_NODE_HEADING
[constant] CMARK_NODE_THEMATIC_BREAK
[constant] CMARK_NODE_FIRST_BLOCK
[constant] CMARK_NODE_LAST_BLOCK
[constant] CMARK_NODE_TEXT
[constant] CMARK_NODE_SOFTBREAK
[constant] CMARK_NODE_LINEBREAK
[constant] CMARK_NODE_CODE
[constant] CMARK_NODE_HTML_INLINE
[constant] CMARK_NODE_CUSTOM_INLINE
[constant] CMARK_NODE_EMPH
[constant] CMARK_NODE_STRONG
[constant] CMARK_NODE_LINK
[constant] CMARK_NODE_IMAGE
[constant] CMARK_NODE_FIRST_INLINE
[constant] CMARK_NODE_LAST_INLINE
[constant] CMARK_NO_LIST
[constant] CMARK_BULLET_LIST
[constant] CMARK_ORDERED_LIST
[constant] CMARK_NO_DELIM
[constant] CMARK_PERIOD_DELIM
[constant] CMARK_PAREN_DELIM

Source code / Issues

https://git.sr.ht/~fancycade/chicken-cmark