We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting segmentation fault when working with more than one partial using the block notation.
I've managed to isolate the issue into the following code:
use handlebars::Handlebars; use std::collections::HashMap; fn main() { let mut handlebars = Handlebars::new(); let template1 = "<outer>{{> @partial-block }}</outer>"; let template2 = "{{#> t1 }}<inner>{{> @partial-block }}</inner>{{/ t1 }}"; let template3 = "{{#> t2 }}Hello{{/ t2 }}"; handlebars .register_template_string("t1", &template1) .unwrap(); handlebars .register_template_string("t2", &template2) .unwrap(); let mut data = HashMap::new(); data.insert("hello".to_string(), "world"); let page = handlebars.render_template(&template3, &data).unwrap(); println!("{}", page); }
Running this code, what I expected:
<outer><inner>Hello</inner></outer>
However, this is what I'm getting instead:
[2] 1953 segmentation fault cargo run
The text was updated successfully, but these errors were encountered:
It seems stack overflow happened for @partial-block. Thank you for reporting and I will look into this.
@partial-block
Sorry, something went wrong.
(test) add test case to reproduce #400
62dd3d0
@rplopes could you please try fix in #401 if it works for your case?
I can confirm it works great indeed, awesome work 👍
@rplopes Thank you again for verifying and your test case has been super helpful.
sunng87
Successfully merging a pull request may close this issue.
I'm getting segmentation fault when working with more than one partial using the block notation.
I've managed to isolate the issue into the following code:
Running this code, what I expected:
However, this is what I'm getting instead:
The text was updated successfully, but these errors were encountered: