mitsuhiko / minijinja

MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2
https://docs.rs/minijinja/
Apache License 2.0
1.56k stars 86 forks source link

Allow macro state to resolve to the initial template context #542

Closed mitsuhiko closed 1 month ago

mitsuhiko commented 1 month ago

This changes how macros are resolving variables. Previously if a macro did not enclose a value from the render scope it would only resolve down to the true global state passed to the environment. This changes it so that the initial state passed to the context can also be used.

Refs #535