Skip to content

Whitespace and indentation

Indentation organizes source; it does not define scope. A block is closed by $end, regardless of its indentation.

A non-emitting directive on its own line removes that line from the result. This applies to $set, block headers, $elif, $else and $end, including multiline headers.

A block opened on its own line removes its content’s common indentation, retaining any extra indentation:

$if(true)
Hello!
More detail.
$end

Result:

Hello!
More detail.

You can indent the source for reading without shifting the entire sent message. Nested blocks handle their own content, while inline headers do not dedent their bodies.

A blank line between standalone control statements contributes no output. In the message text, blank lines separate paragraphs and do not count toward common indentation.

Lists, quotes and code fences retain their relative indentation. PokkanStrings neither parses Markdown nor performs a global cleanup after rendering, so indentation inside strings and line breaks generated by functions are untouched.

If the final standalone $end is at EOF without a following newline, one final authored body newline is suppressed. If that closing line has a newline, the body’s newline stays.

This allows a block to finish without adding an extra line to the message. Generated string newlines are never suppressed, and LF, CRLF or mixed endings keep their authored form.