...
This commit is contained in:
@@ -5,6 +5,7 @@ use std::path::Path;
|
||||
use tera::{Context, Tera};
|
||||
|
||||
/// A builder for creating and rendering templates using the Tera template engine.
|
||||
#[derive(Clone)]
|
||||
pub struct TemplateBuilder {
|
||||
template_path: String,
|
||||
context: Context,
|
||||
@@ -254,7 +255,7 @@ mod tests {
|
||||
fn test_template_with_hashmap_vars() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Create a temporary template file
|
||||
let mut temp_file = NamedTempFile::new()?;
|
||||
writeln!(temp_file, "{{ greeting }}, {{ name }}!")?;
|
||||
writeln!(temp_file, "{{{{ greeting }}}}, {{{{ name }}}}!")?;
|
||||
temp_file.flush()?;
|
||||
|
||||
// Create a HashMap of variables
|
||||
|
||||
Reference in New Issue
Block a user