When using a partial with indentation, only the first line is indented; the rest of the partial is rendered unindented. However, partials must inherit indentation as described in the spec, so I think this is a bug?
Here's a minimal example to reproduce the issue:
#[macro_use]
extern crate serde_derive;
use maplit::hashmap;
use std::io;
#[derive(Serialize)]
struct Person {
name: String,
}
fn main() {
let template = mustache::compile_path("greet_all.mustache").unwrap();
let people = hashmap! { "people" => vec![
Person { name: "Alice".to_string() },
Person { name: "Bob".to_string() },
]};
template.render(&mut io::stdout(), &people).unwrap();
println!();
}
Given templates:
{{! greet.mustache }}
hello {{{name}}}
nice to see you today
When using a partial with indentation, only the first line is indented; the rest of the partial is rendered unindented. However, partials must inherit indentation as described in the spec, so I think this is a bug?
Here's a minimal example to reproduce the issue:
Given templates:
It should print:
But prints: