Union

Node

Module PuduLangDocgen.Template

type Node = Literal(Str) | Value(Str, Bool) | Section(Str, Bool, Array[Node]) | Partial(Str)

View source

One piece of a parsed template

Variants

Name Holds Description
Literal (Str)
Value (Str, Bool)
Section (Str, Bool, Array[Node])
Partial (Str)
Name Description
parse A template parsed into nodes; an unclosed or mismatched section is an error. `\{\{name\}\}` escapes, `\{\{\{name\}\}\}` and `\{\{& name\}\}` do not, `\{\{#name\}\}…\{\{/name\}\}` repeats or shows, `\{\{^name\}\}` shows when empty, `\{\{>name\}\}` includes, `\{\{! …\}\}` is ignored.
render A template rendered against metadata; `partials` are parsed templates by name.