tclcmark(n)
π 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 thelangattribute on the<pre>tag instead of aclasson 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 inTEXTwith theU+FFFDreplacement 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 thedata-sourceposattribute on all block elements.-to FORMATβ Specifies the output format.FORMATmust be one ofhtml,latex,man,xml,commonmarkortext. Themanoutput is a groffmanpage>page without the header.-unsafeβ Enables raw HTML by placeholder comments and unsafe links such asjavascript :,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 of0implies 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.
-gfmβ Enables all GFM extensions. Equivalent to specifying all options below.-autolinkβ Enables autolink (https://github.github.com/gfm/#autolinks-extension-) enhancements.-strikethroughβ Enables the strikethrough (https://github.github.com/gfm/#strikethrough-extension-) extension for wrapping strikethrough text in tilde~characters.-tableβ Enables the table (https://github.github.com/gfm/#tables-extension-) for formatting tables.-tagfilterβ Enables the tagfilter (https://github.github.com/gfm/#disallowed-raw-html-extension-) extension that disallows certain HTML tags.
π 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
- nixpkgs unstable: tcl-cmark 1.1
- Copyright (c) 2017-2025 Ashok P. Nadkarni
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms