Since version 4.5.2, the following test has started failing:
@Test
public void shouldResolveIterationVariablesInPartial() throws IOException {
Handlebars handlebars = new Handlebars();
Template template = handlebars.compileInline("{{#each items}}{{> myPartial}}{{/each}}");
Map<String, Object> model = new HashMap<>();
model.put("items", new String[]{"Item 1"});
String result = template.apply(Context.newBuilder(model).build());
assertEquals("@index: 0, @first: first, @last: last\n", result);
}
where myPartial.hbs is as follows:
@index: {{@index}}, @first: {{@first}}, @last: {{@last}}
Is this a regression?
Since version 4.5.2, the following test has started failing:
where
myPartial.hbsis as follows:Is this a regression?