Skip to main content

Handlebars helper reference

Follow

Comments

13 comments

  • Tony Zuko

    Thank you for the reference! Where can I find a list of options for the "options" parameter for regexMatch?

    Comment actions Permalink
  • Tom Santiago

    Hi Tony, I've updated the article to link to this resource for regex options: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions. I hope that helps. Thanks for the feedback.

    Comment actions Permalink
  • Jeff Dollard

    Is there an example for the #switch syntax?  It's the only block logical operator that doesn't have any hint as to the syntax.

     

    Comment actions Permalink
  • Courtney Jordan

    Hi Jeff Dollard,

    Thanks for providing this feedback! We're looking into this for you.

    Comment actions Permalink
  • David Gollom

    The substring description for the end index doesn't match the behavior.  The end index acts like javascript and it's non-inclusive.  That should be noted above.  This was baffling me for a bit.  How did this {{substring "itemizationCode" 0 4}} return "item" ?? 

     

    Comment actions Permalink
  • Courtney Jordan

    Hi David Gollom,

    Thanks for letting us know - I updated the article with this note. Is there anything else we should add based on your findings? Thank you so much for your help!

    Comment actions Permalink
  • Courtney Jordan

    Hi Jeff Dollard,

    We haven't found any information on the switch handlebars. Have you had any luck?

    Comment actions Permalink
  • Jeff Dollard

    Hi Courtney - no luck with the switch syntax, I sort of gave up on guessing at it ¯\_(ツ)_/¯

     

    I found another way to structure my logic, so it didn't keep me from moving forward.

    Comment actions Permalink
  • Courtney Jordan

    Awesome, glad to hear it, Jeff Dollard! Any cool tips you can share that we could add to the docs?

    Comment actions Permalink
  • Yolan Yabut

    Shouldn't the output be "123 Anywhere789 Somewhere"? Both have values.

    Comment actions Permalink
  • Tom Santiago

    Hi Yolan Yabut, 

    This image describes why the expression evaluates to false:

    We've revised the example for clarity.

    Comment actions Permalink
  • Courtney Jordan

    Thank you so much for letting us know how we could improve the article, Yolan Yabut! Please let us know if there are other things we can add! We've also added more examples to the #and section. Hope they're helpful!

    Comment actions Permalink
  • viliandy leonardo

    Jeff Dollard 

    I want to let you know that the "Switch" syntax is not supported. We are updating this KB. Thanks for bringing it to our attention!

    Comment actions Permalink

Please sign in to leave a comment.