question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handlebars 1.10.1 : RegisterHelper different?

See original GitHub issue

I 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: image

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:closed
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rexmcommented, Jun 4, 2019

They are all up for grabs 😉

1reaction
vzwickcommented, Jun 3, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found