djc / askama

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

Add `elif` keyword #1056

Closed FalkWoldmann closed 1 month ago

FalkWoldmann commented 1 month ago

Hi,

we recently migrated from Tera to Askama and overall it was quite straightforward. One thing that did not work out of the box was the elif keyword, so it would be nice to include that. In addition, elif seems to be supported by jinja.

djc commented 1 month ago

I guess I'm open to having that added as an alias for else if. Would you be able to submit a PR?

The code is here: https://github.com/djc/askama/blob/main/askama_parser/src/node.rs#L375.

GuillaumeGomez commented 1 month ago

Ah cool. :D