From c42c36ef1d47094af443a7e9cbbcd24501b5334a Mon Sep 17 00:00:00 2001 From: Guilherme I F L Weizenmann Date: Thu, 22 Sep 2016 22:07:49 -0300 Subject: [PATCH] Add @value syntax to Iterable --- .../java/com/github/jknack/handlebars/helper/EachHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/handlebars/src/main/java/com/github/jknack/handlebars/helper/EachHelper.java b/handlebars/src/main/java/com/github/jknack/handlebars/helper/EachHelper.java index 9336215ff..4d4fa1512 100644 --- a/handlebars/src/main/java/com/github/jknack/handlebars/helper/EachHelper.java +++ b/handlebars/src/main/java/com/github/jknack/handlebars/helper/EachHelper.java @@ -63,6 +63,7 @@ public Object apply(final Object context, final Options options) Object it = loop.next(); Context itCtx = Context.newContext(parent, it); itCtx.combine("@index", index) + .combine("@value", it) .combine("@first", index == base ? "first" : "") .combine("@last", !loop.hasNext() ? "last" : "") .combine("@odd", even ? "" : "odd")