module Cmark
Overview
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.
Defined in:
cmark.crcmark/alignment.cr
cmark/delim_type.cr
cmark/error.cr
cmark/event.cr
cmark/event_iterator.cr
cmark/extension.cr
cmark/fencing_details.cr
cmark/lib_cmark.cr
cmark/list_type.cr
cmark/node.cr
cmark/node_maker.cr
cmark/node_type.cr
cmark/option.cr
cmark/renderer.cr
cmark/renderers/html_renderer.cr
cmark/version.cr
Constant Summary
-
VERSION =
"0.1.3"
Class Method Summary
-
.commonmark_to_html(text : String, options = Option::None) : String
Renders a Commonmark-only text as HTML.
-
.document_to_html(text : String, options = Option::None, extensions = Extension::None) : String
Renders commonmark text as HTML.
-
.gfm_to_html(text : String, options = Option::None) : String
Renders commonmark text with all of the GFM extensions enabled as HTML.
-
.parse_commonmark(text : String, options = Option::None) : Node
Parses a Commonmark-only document text.
-
.parse_document(text : String, options = Option::None, extensions = Extension::None) : Node
Parses a commonmark document text.
-
.parse_gfm(text : String, options = Option::None) : Node
Parses a commonmark document text with all of the GFM extensions enabled.
Class Method Detail
Renders a Commonmark-only text as HTML.
Renders commonmark text as HTML.
Renders commonmark text with all of the GFM extensions enabled as HTML.
Parses a Commonmark-only document text.
Parses a commonmark document text.
Parses a commonmark document text with all of the GFM extensions enabled.