mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-30 06:21:13 +00:00

This change * allows using empty arrays `[]` in expessions, * adds a cut when the leading `[` was encountered, and * fixes the interaction between arrays and boolean OR. IMO the restriction that you couldn't use empty arrays is not needed. The missing cut made error messages slictly worse if you forget to add the closing `]`. Filter expressions must not have white spaces before the pipe `|`. The white space is used to tell a filter expressions, and `std::ops::Or` apart.
8 lines
268 B
Plaintext
8 lines
268 B
Plaintext
error: loop.cycle(…) cannot use an empty array
|
|
--> tests/ui/loop_cycle_empty.rs:3:10
|
|
|
|
|
3 | #[derive(Template)]
|
|
| ^^^^^^^^
|
|
|
|
|
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
|