Closed GandelXIV closed 9 months ago
Currently this uses two .clones to merge global and local contexts for rendering, yet it works fine.
.clones
let mut tera = Tera::new(); tera.global_context().insert("name", "John Doe"); let content = tera .render_str("Hello, {{ name }}!", &Context::new()) .unwrap(); assert_eq!(content, "Hello, John Doe!".to_string()); let content2 = tera .render_str( "UserID: {{ id }}, Username: {{ name }}", &context! { id => &7489 }, ) .unwrap(); assert_eq!(content2, "UserID: 7489, Username: John Doe");
Can you rebase? LGTM otherwise
Done
Currently this uses two
.clones
to merge global and local contexts for rendering, yet it works fine.Example code