Skip to main content

Module template

Module template 

Source
Expand description

Token substitution for --emit verdict templates, shared by every tool.

A template carries {TOKEN} placeholders; render expands the ones it recognises from a (name, value) table and leaves anything else — including unknown {TOKEN}s and stray braces — untouched. The substitution is a single left-to-right pass, so replacement text is never rescanned: a value that happens to contain {RESULT} (e.g. a command’s captured stdout) is emitted verbatim rather than re-expanded.

Functions§

render
Expand recognised {TOKEN} placeholders in template from tokens.