tclcmark(n)

πŸ“¦ version 1.1, in nixpkgs unstable

πŸ’… tclcmark(n) β€” Tcl Github-flavored Markdown processor

🌸 NAME 🌸

cmark – Tcl interface to CommonMark / Github Flavored Markdown

✨ SYNOPSIS ✨

package require cmark
cmark::render ?options? TEXT

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, the cmark package is your Tcl script-level interface to the cmark-gfm library (https://github.com/github/cmark). It’s here to parse and render CommonMark (http://commonmark.org/) formatted text β€” which is literally the formalized specification of the commonly used Markdown syntax. The library includes support for Github extensions that add several features to the original specification. The extended syntax accepted by the library is described in the Github Flavored Markdown (https://github.github.com/gfm/) specification. Here we refer to all these syntax variants collectively as CommonMark. slay.

The primary command exported from the package is the render command:

cmark::render ?options? TEXT

The command parses TEXT, which should be in CommonMark format, and returns it rendered in one of several different output formats. Currently supported output formats are HTML, Latex, Groff manpage, CommonMark XML, CommonMark and plain text.

🧚 Parsing 🧚

The following options affect parsing of TEXT.

  • -footnotes β€” Enable parsing of footnotes.
  • -ghprelang β€” Uses Github style tags for code blocks that have a language attribute. This uses the lang attribute on the <pre> tag instead of a class on the <code> tag that wrap the block.
  • -liberaltag β€” Be liberal in interpretation of HTML tags.
  • -smart β€” Replaces straight quotes with curly quotes and double or triple hyphens with en dash and em dash respectively.
  • -utf8validate β€” Checks and replaces invalid UTF-8 character in TEXT with the U+FFFD replacement character.

🌈 Rendering 🌈

The following options control the rendering of the input text.

  • -hardbreaks β€” Renders soft line breaks as hard line breaks.
  • -nobreaks β€” Renders soft line breaks as spaces.
  • -sourcepos β€” Includes the data-sourcepos attribute on all block elements.
  • -to FORMAT β€” Specifies the output format. FORMAT must be one of html, latex, man, xml, commonmark or text. The man output is a groff manpage> page without the header.
  • -unsafe β€” Enables raw HTML by placeholder comments and unsafe links such as javascript :, vbscript: etc. By default, raw HTML is replaced by placeholder string and unsafe links removed.
  • -width β€” Specifies a max line width for wrapping. The default of 0 implies no wrapping. Only applies to CommonMark, Latex and man output formats.
Note that the HTML output format is a fragment and does not include any HTML header boilerplate.

πŸ’– Enabling GFM extensions πŸ’–

By default, the command adheres to the CommonMark (http://commonmark.org/) specification. Various extensions specified in Github Flavored Markdown (https://github.github.com/gfm/) (GFM) may be enabled through the options below.

πŸ‘‘ AUTHOR πŸ‘‘

Ashok P. Nadkarni


That’s the whole tclcmark(n) page, bestie πŸ’– β€” source tclcmark, version 1.1, manual tclcmark(n), and the footer’s date slot is blank in this copy, so consider this your cute sign-off πŸŒˆπŸ’….

πŸ“¦ where this page comes from