-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
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
support for else if #586
Comments
What do you mean ? |
@lovasoa That page contains an example of |
No, it's not supported, that's why I opened this PR. use handlebars::Handlebars;
use serde_json::json;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
let mut reg = Handlebars::new();
println!(
"{}",
reg.render_template(
"
{{#if isActive}}
active
{{else if isInactive}}
inactive
{{else}}
unknown
{{/if}}
", &json!({"isInactive": true}))?
);
Ok(())
}
|
After a quick search, it seems that else-ifs are not present in the current testing suite. |
encounter the same problem,how to solve? |
There's an open issue for this: #12 As is, it is sadly not supported. |
Fixed in #629 |
Hello !
Is support for
else if
planned in this library ?That would be very practical in sqlpage
Thank you !
Ophir
The text was updated successfully, but these errors were encountered: