diff options
author | mcarton <cartonmartin+git@gmail.com> | 2018-12-12 20:43:36 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-12-12 21:48:41 +0100 |
commit | 48c5ebbd2be8f7d89f37f3aa04500b8ad1a3d460 (patch) | |
tree | b21964dcbce68948ae3dee763ea7c61931ed5167 /testing/templates/match-custom-enum.html | |
parent | 9e1cf8f0dff3bd96db4b25703877db5632267ed2 (diff) | |
download | askama-48c5ebbd2be8f7d89f37f3aa04500b8ad1a3d460.tar.gz askama-48c5ebbd2be8f7d89f37f3aa04500b8ad1a3d460.tar.bz2 askama-48c5ebbd2be8f7d89f37f3aa04500b8ad1a3d460.zip |
Allow using brackets for enums in `match`
Diffstat (limited to '')
-rw-r--r-- | testing/templates/match-custom-enum.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/templates/match-custom-enum.html b/testing/templates/match-custom-enum.html index cb45b8f..bec38b9 100644 --- a/testing/templates/match-custom-enum.html +++ b/testing/templates/match-custom-enum.html @@ -1,6 +1,6 @@ {% match color %} -{% when Color::Rgb with (r, g, b) %} -Colorful: #{{ "{:02X}"|format(r) }}{{ "{:02X}"|format(g) }}{{ "{:02X}"|format(b) }} +{% when Color::Rgb with {r, g: g, b: blue} %} +Colorful: #{{ "{:02X}"|format(r) }}{{ "{:02X}"|format(g) }}{{ "{:02X}"|format(blue) }} {% when Color::GrayScale with (val) %} Gray: #{{ "{:02X}"|format(val) }}{{ "{:02X}"|format(val) }}{{ "{:02X}"|format(val) }} {% else %} |