module

Cmark

This module offers high-level parsing and rendering of markdown content, be it Commonmark-only, full GFM, or partially GFM.

If the content is Commonmark-only use the respective commonmark parsing and HTML rendering methods for the best performance. If all of the GFM extensions must be enabled use the gfm methods. For partial support of GFM extensions use the more generic document methods.

Constants

VERSION = "0.1.3"

Class methods

commonmark_to_html(text : String, options = Option::None) : String

Renders a Commonmark-only text as HTML.

Source
document_to_html(text : String, options = Option::None, extensions = Extension::None) : String

Renders commonmark text as HTML.

Source
gfm_to_html(text : String, options = Option::None) : String

Renders commonmark text with all of the GFM extensions enabled as HTML.

Source
parse_commonmark(text : String, options = Option::None) : Node

Parses a Commonmark-only document text.

Source
parse_document(text : String, options = Option::None, extensions = Extension::None) : Node

Parses a commonmark document text.

Source
parse_gfm(text : String, options = Option::None) : Node

Parses a commonmark document text with all of the GFM extensions enabled.

Source

Nested types