handlebars-rust
handlebars-rust copied to clipboard
Stack overflow when using inline partial
Hey, everybody!
When using regular partials, as well as inline partials, I get a “stack overflow” error, although nesting is obviously limited. This is probably some internal bug.
fn test_hs() {
let mut hs = Handlebars::new();
hs.register_template_string("primary", "{{> @partial-block }}").unwrap();
hs.register_template_string("secondary", "{{#*inline \"inl\"}}Bug{{/inline}}{{#>primary}}{{>inl}}{{> @partial-block }}{{/primary}}").unwrap();
hs.register_template_string("current", "{{>secondary}}").unwrap();
hs.render("current", &()).unwrap();
}
Confirmed. The current stack based partial block implementation has some issues. I will need to revamp this part.