variables - iamgio/quarkdown GitHub Wiki

.var {name} {value} defines a variable. value is a dynamic value, meaning it may be of any type.

.var {name} {Quarkdown}

The variable can be accessed as a parameter-less function:

Hello, **.name**!

Hello, Quarkdown!

 

A variable can be redefined:

.var {num} {5}

.num

.var {num} {.sum {.num} {1}}

.num

5

6

 

As mentioned in Syntax of a function call:

A body argument always refers to the last parameter of the signature [...]

This allows the variable's value to be either inline or block:

.var {myrow}
  .row gap:{2cm}
    A

    B

    C

.container background:{yellow} padding:{1cm}
  .myrow
Result
⚠️ **GitHub.com Fallback** ⚠️