handlebars-rust
handlebars-rust copied to clipboard
Rust templating with Handlebars
Hi! this is really a bug report in reproducible form. I was puzzling over how to replicate the behaviour from the decorator example which writes into the context, when that...
version: 4.4 ``` #[test] fn test_partial_using_partial() { let mut handlebars = Handlebars::new(); handlebars .register_partial("system", "{{#if system_prompt}}{{{system_prompt}}} {{/if}}") .unwrap(); handlebars .register_partial("user", "User: {{>system}}{{{prompt}}}") .unwrap(); let output = handlebars .render_template("{{>user system_prompt=\"hello\" prompt=\"world\"}}",...
We noticed this issues when upgrading to `4.x`. If an `/each` is not followed by a `\n` the rendered template will contain extra whitespace. This throws off formats which expect...
I have a template that is pretty much just `Hello {{name}}`, and the `name` is `{{real_name}}`, which is `world`, but when doing rendering it will only return `Hello {{real_name}}`. I...
Currently when I have a string in my helper that I want to transform into a template to render, I have to create a new instance of Handebars, register a...
Hello! First of all, thanks a lot for your hard work on this library! ## Issue Description I have found a case where the library behaves differently than handlebars.js: Here...
Fixes #573 Our previous implementation of partial indent assumes the partial has only `RawString` or `Expression` so that we can check line endings easier. But with blocks included in partial,...
We see 10% performance improvement in our nested-loop benchmark after switching to `LazyCompactString`
Hi, Let's say we have built a couple of partials with these names "Car" and "Airplane", which are also connected to JSON objects of the same names. Each of these...
I can't figure out how to use square brackets to refer to a helper. While fuzzing, a template like `{{[\0] ''}}` failed and said there was no helper named `\0`...