diff --git a/lib/handlebars/compiler.js b/lib/handlebars/compiler.js index 96ae36ab..2ffd8296 100644 --- a/lib/handlebars/compiler.js +++ b/lib/handlebars/compiler.js @@ -77,6 +77,28 @@ Handlebars.registerHelper('blockHelperMissing', function(context, fn, inverse) { }, function(context, fn) { return fn(context) }); + +Handlebars.registerHelper('each', function(context, fn, inverse) { + var ret = ""; + + if(context.length > 0) { + for(var i=0, j=context.length; i