handlebars.java
handlebars.java copied to clipboard
Assigned variables not replaced in nested helper
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.