---
name: "tclsoldout"
section: "3tcl"
platform: "linux"
package: "tclsoldout"
version: "0.1.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tclsoldout"
---

# tclsoldout(3tcl)

Markdown parser

## NAME

**TclSoldout** – Markdown parser

## SYNOPSIS

**package** **require** **TclSoldout** \[0.1.1\]

**::soldout::escape\_html** *string*

**::soldout::mkd2html** \[**-discount** \| **-natext**\] *markdown*

**::soldout::mkd2xhtml** \[**-discount** \| **-natext**\] *markdown*

## DESCRIPTION

The **TclSoldout** extension is a Tcl binding to libsoldout, a lightweight C library that can parse Markdown.

The **::soldout::escape\_html** command replace '\<', '\>', '&' and '"' in the *string* with their HTML entities and return the modified text.

The **::soldout::mkd2html** command parse *markdown* text and return HTML (self-closing tags are rendered like this: \<br\>).

The **::soldout::mkd2xhtml** command parse *markdown* text and return XHTML (self-closing tags like: \<br /\>).

The options are as follows:

- **-discount**

  enable Discount extensions:

  - image size specification, by appending "=(width)x(height)" to the link

  - pseudo-protocols in links:

    - abbr:description for \<abbr title="description"\>...\</abbr\>

    - class:name for \<span class="name"\>...\</span\>

    - id:name for \<span id="name"\>...\</span\>

    - raw:text for verbatim unprocessed text inclusion

  - class blocks: blockquotes beginning with %class% will be rendered as a div of the given class(es)

    and PHP-Markdown-like tables.

- **-natext**

  enable Discount extensions and Natasha's own extensions:

  - id attribute for headers, using the syntax id#Header text

  - class attribute for paragraphs, by putting class name(s) between parenthesis at the very beginning of the paragraph

  - \<ins\> and \<del\> spans, using respectively ++ and -- as delimiters (with emphasis-like restrictions, i.e. an opening delimiter cannot be followed by a whitespace, and a closing delimiter cannot be preceded by a whitespace)

  - plain \<span\> without attribute, using emphasis-like delimiter \|

## SEE ALSO

*libsoldout:* **https://github.com/faelys/libsoldout**

## AUTHORS

**TclSoldout** was written by Svyatoslav Mishyn ⟨*juef@openmailbox.org*⟩.
