Repository navigation
Release v1.9.0
Release v1.9.0
Changelog
Added
${#elseif …}/${#else}branches in expression conditionals (conditional_expressions.enabled: true):${#if a > 5000}…${#elseif a > 1000}…${#else}…${#endif}. The first true branch is rendered and the expressions after it are not evaluated;${#else}is the optional, last fallback. Branches can hold nested blocks and loops, work on whole table rows when the markers sit in rows of their own, and count towardsmax_evaluations(spec004-else-branches).- Configuration
conditional_elseif_opening/conditional_elseif_closing(${#elseif/}) andconditional_else_opening/conditional_else_closing(${#else/}), and the matching optionalWordTemplateProcessor/ConditionalExpressionApplicatorconstructor arguments. listConditionalExpressions()also lists${#elseif}expressions;lintConditionalExpressions()checks them and the blocks nested in every branch.- Layout errors (per
on_error): a branch marker with no open expression block, inside a loop body, in a named block, in a block that is never closed, after the${#else}of its block, sharing a paragraph with another marker, outside the rows of a row block, or a branch cutting table cells in half.
Changed
- With expression conditionals enabled,
listVariables()omits#elseif …/#elsemarkers. - An evaluation error in any branch applies
on_errorto the whole block:hideremoves it,keepleaves every marker and branch as text.
Full Changelog: v1.8.0...v1.9.0