diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-31 09:02:17 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-31 11:30:35 +0100 |
commit | 91874702f0f3581549c129369a8bc0783006b5fa (patch) | |
tree | 5b70acb63e7634cc8b9d1dfc29eabd7b4d30238a /testing/tests/ui/match_with_extra.rs | |
parent | da0b6ead0e75082bfffa24f8529d1f83961ba45c (diff) | |
download | askama-91874702f0f3581549c129369a8bc0783006b5fa.tar.gz askama-91874702f0f3581549c129369a8bc0783006b5fa.tar.bz2 askama-91874702f0f3581549c129369a8bc0783006b5fa.zip |
Allow comments in `{% match %}` and remove panic!
Diffstat (limited to 'testing/tests/ui/match_with_extra.rs')
-rw-r--r-- | testing/tests/ui/match_with_extra.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/tests/ui/match_with_extra.rs b/testing/tests/ui/match_with_extra.rs new file mode 100644 index 0000000..528441e --- /dev/null +++ b/testing/tests/ui/match_with_extra.rs @@ -0,0 +1,20 @@ +use askama::Template; + +#[derive(Template)] +#[template( + ext = "txt", + source = r#" +{%- match good -%} + // Help, I forgot how to write comments! + {%- when true %} + good + {%- when _ -%} + bad +{%- endmatch -%}"# +)] +struct MatchWithExtra { + good: bool, +} + +fn main() { +} |