Handlebars 1.10.1 : RegisterHelper different?
See original GitHub issueI register this handlebars custom code:
handlebarsContext.RegisterHelper("Random", (writer, context, arguments) =>
{
});
And when processing this text:
{{Random Type=\"Text\" Min=8 Max=20}}
The arguments look like this:
Note that the Min and Max are defined as a string instead of a int ?
Is this something which has been changed lately?
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
c# - HandleBars .Net If Comparision
I had the same problem and I created a helper function "ifCond" that works with numeric data types and string.
Read more >does not compile correctly #if · Issue #340 · Handlebars ...
I found a workaround, creating a block helper I call ifdef which basically does what I would have expected if to do. HandlebarsBlockHelper...
Read more >Handlebars.Net 1.10.1
Version Downloads Last updated
2.1.4 1,457,872 5 months ago
2.1.3 158,761 6 months ago
2.1.2 4,603,516 4/7/2022
Read more >Block Helpers
Block helpers make it possible to define custom iterators and other functionality that can invoke the passed block with a new context.
Read more >handlebars-helpers
Block helper that iterates over an array or object. If an array is given, .forEach is called, or if an object is given,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
They are all up for grabs 😉
I went back through the commits to narrow this one down: 528555640934b12ad5a8ea0d29dba421ca1ebf91 (#262) seems to be the culprit.
In particular, it seems like https://github.com/rexm/Handlebars.Net/pull/262/files#diff-e437d7a0fb46621e851a4220c8f16401L85 wasn’t reimplemented,
bool
hash parameters are probably affected as well.