Skip to content

markdown

Source

Hook for printing markdown and returning the output.

Inputs

Name Type Default Required Description
text str True The text to render as markdown.
justify str None False Justify value for paragraphs. Defaults to None.

Arguments

Position Argument Type
1 text str

Returns

None

Examples

Basic markdown

Markdown doesn't render perfectly in the terminal but it is real markdown.

compact->: |
  markdown "# A title"
  Section with things
expanded:
  ->: markdown
  text: |
    # Another title
    More sections with things

╔═════════════════════════════════╗
║              A title            ║
╚═════════════════════════════════╝
Section with things
╔═════════════════════════════════╗
║           Another title         ║
╚═════════════════════════════════╝
More sections with things

All section types with markdown

Example with with many section headers.

Note output headers will have additional formatting in console.

expanded:
  ->: markdown
  text: |
    # Header
    Stuff and things
    ## Second header
    Stuff and things
    ### Third header
    Stuff and things
    #### Fourth header
    Stuff and things
    ##### Fifth header
    Stuff and things
╔═════════════════════════════════════════════════════════════════╗
║                           Header                                ║
╚═════════════════════════════════════════════════════════════════╝

Stuff and things


                        Second header

Stuff and things

                         Third header

Stuff and things

                        Fourth header

Stuff and things

                         Fifth header

Stuff and things