Skip to content

Enhance Template Logic: Nested If/Elif/Else, Parentheses, and Logical Operators #586

@arbuthnot-eth

Description

@arbuthnot-eth

Users need more powerful template logic when composing notes. This feature adds a robust expression evaluator and a nesting-aware IF subsystem to support:

  • Parentheses and precedence for complex conditions.
  • Logical operators as words and symbols (not/and/or and !/&&/||).
  • Comparison operators and JS-like truthiness.
  • Elif/elseif chains and deeply nested branches.
  • Conditional {% set %} assignments that only run in the selected branch.
    This substantially improves template expressiveness while keeping behavior predictable and safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions