djc / askama

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

Enhance match to include multiple targets #911

Closed PizzasBear closed 11 months ago

PizzasBear commented 11 months ago

This adds ability to or patterns in any context (e.g. in when and let). This is done by adding an OrChain variant to the Target enum in askama_parser, and simply adding a | between or-chained patterns in askama_derive.

Closes #904

PizzasBear commented 11 months ago

I've removed the comments, forgot to remove them prior to committing...