djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.35k stars 215 forks source link

Allow to have access to imports in block calls #991

Closed GuillaumeGomez closed 4 months ago

GuillaumeGomez commented 5 months ago

Fixes https://github.com/djc/askama/issues/989.

GuillaumeGomez commented 5 months ago

Solved clippy lints as well.

Hopefully with this one, I'll have everything I need to end the switch from tera to askama on docs.rs. :)

GuillaumeGomez commented 5 months ago

As discussed in https://github.com/djc/askama/issues/989, variables defined outside a block should not be accessible inside a block.

GuillaumeGomez commented 5 months ago

Ah I need https://github.com/djc/askama/pull/986 to be merged first for this ui test to work. ^^'

GuillaumeGomez commented 5 months ago

Rebased. It's now ready for review!

GuillaumeGomez commented 4 months ago

Since you approved, merging. Thanks for the reviews!