handlebars.java icon indicating copy to clipboard operation
handlebars.java copied to clipboard

Assigned variables not replaced in nested helper

Open Purus opened this issue 5 years ago • 0 comments

I am assigning a value to a variable named "VarA" and trying to use it inside another custom helper.

{{#assign 'varA'}}{{xPath request.body '//*[local-name()="address"]/text()'}}{{/assign}}

{{myHelper 'id=(varA)'}}

This does not populate the required value before evaluation the custom helper. I get the error "could not find helper: 'varA'"

But using the below works.

{{varA}}

I assume the inline templates should be parsed first and then passed on to the next level. Please let me know how to make this work.

PS: I am using this with wiremock.

Purus avatar Mar 11 '20 07:03 Purus