Documentation - v0.28.2
    Preparing search index...

    Variable thtmlConst

    thtml: HtmlTagFn = ...

    Like html, but preserves whitespace as-is instead of collapsing it like HTML does.

    This variant is fully compatible with the Bot API HTML syntax.

    Leading indentation common to all lines is stripped (dedented), making it safe to use in indented code.

    Also has static methods:

    • thtml.escape - escape a string to be safely used in HTML
    • thtml.unparse - like html.unparse, but preserves whitespace in the output
    // whitespace and newlines are preserved, common indent is stripped
    thtml`
    <b>Hello</b>,
    <i>world</i>!
    `
    // => { text: 'Hello,\nworld!' }