mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-30 06:21:13 +00:00
21 lines
296 B
Rust
21 lines
296 B
Rust
use rinja::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() {
|
|
}
|