The authoring grammar for stored message templates (email, Slack), and
nothing else: text, {{variable}}, {{upper variable}},
{{#if optionalVariable}}…{{/if}}, {{#equals axis "VALUE"}}…{{/equals}},
and {{#each list}}…{{/each}}, whose body reads the item's own fields.
Deliberately not Handlebars. A general template engine accepts helpers,
partials, comments, subexpressions and raw {{{…}}} output, every one of
which is either an injection surface or a construct no operator should reach
for in customer copy. Recognising a closed vocabulary means anything else is
a reportable syntax error rather than something to sanitise later.
Issues are recoverable: parsing continues past a bad tag so an author sees
every mistake in one pass. The nodes returned alongside them are still only
the well-formed prefix, so callers must not evaluate an AST whose parse
reported issues.
The authoring grammar for stored message templates (email, Slack), and nothing else: text,
{{variable}},{{upper variable}},{{#if optionalVariable}}…{{/if}},{{#equals axis "VALUE"}}…{{/equals}}, and{{#each list}}…{{/each}}, whose body reads the item's own fields.Deliberately not Handlebars. A general template engine accepts helpers, partials, comments, subexpressions and raw
{{{…}}}output, every one of which is either an injection surface or a construct no operator should reach for in customer copy. Recognising a closed vocabulary means anything else is a reportable syntax error rather than something to sanitise later.Issues are recoverable: parsing continues past a bad tag so an author sees every mistake in one pass. The nodes returned alongside them are still only the well-formed prefix, so callers must not evaluate an AST whose parse reported issues.
This module imports nothing.