Allow assign helper to be called multiple times
iliekturtles opened this issue · comments
The assign
helper clones the ctx
parameter, assigns the value, and sets the result to the render context. Calling assign multiple times leaves the render context only containing the last assignment call.
handlebars_misc_helpers/src/assign_helpers.rs
Lines 38 to 43 in 0e60d86
- Should the original context be changed before assigning to the render context? This would allow for multiple assignments.
- Is this actually desired behavior and the fix should be updated documentation? e.g. if calling assign multiple times is desired, a new complex object that maintains past values should be created.
Issue opened based on feedback in SuperCuber/dotter#134.