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
Update to handlebars v4.0.0 (blocked) #68
Comments
IIRC this is already an open issue in the handlebars-rs repository, but if not you should open it there, as I just depend on it :) I might be using an outdated version where it's fixed though - I'll update and check if that fixes it. |
I found a PR, which is somewhat related on their Github. The PR is closing this issue, which is also related to whitespace. Those two are the only somewhat related mentions on their Github I could find. The PR was merged on the fourth of January this year, so it might already be fixed in the most recent version. Ohh and thanks for the quick answer and cooperation :). |
I also figured out a workaround for now. ( Might also be the intended way to solve this problem ) Handlebar offers the ability to control whitespace with the Inserting this character in the following way, gets rid of the whitespace between each iteration and at the beginning of the loop. {{~#each ssh.key-files}} ssh-add {{this}}; {{~/#each}} The snippet results in the expected result from the opening statement. |
Yep, this is also what I currently do. (for example with if blocks) |
Oh just saw the seocnd comment, the second issue is the one I was recalling. I'll check it out. |
Seems like this is indeed merged to the latest handlebars version 4.0 which got released a couple days ago. However another crate I use called handlebars_misc_helpers did not update to it yet, causing a version mismatch. I've opened an issue there but for now it's blocking me from upgrading, but when it's fixed it should Just Work™️ |
Ok, thanks for the work :) |
I'll reopen this as a reminder to update when the library updates |
Just a heads up that while your opened issue remains unresolved in handlebars_misc_helpers repo they seems to have updated the handlebars dependency to 4.0 in 0.12.x releases. |
@RasmusBertell thanks, updated. |
Environment
Description
Using the
{{#each list}
syntax in Handlebar file inserts a new line after each iteration.Evaluating the same syntax on the Handlebar website does not insert a new line.
Reproduction
In my template file I included:
local.toml
contains:dotter deploy
now renders the template.Expected behavior
Resulting file section:
Actual behavior
There is a new line inserted between each iteration of the loop.
I created a quick reproduction on the handlebars website with the input data translated to json. There is no new line inserted.
The text was updated successfully, but these errors were encountered: