mwunsch/handlebars.scala — pull request #3 by haywood (2012-10-22 17:55:12+00:00)
Title: Section and Helper Semantics

In the current implementation, inverted sections will only render for undefined keys, rather than for all "falsy" ones.

Additionally, parameter resolution for Helpers does not allow the passing of undefined parameters, which leads to runtime errors. For example, calling "#if" with an undefined key will lead to an exception, because the helper's parameter list is emptied due to the filtering of undefined values.

This patch includes changes to the path resolution process and the context model that help to address both of these issues. It also distinguishes the rendering process for helpers and sections in order to better address the differences in their semantics.

It also attempts to implement the conditional rendering (minus else) of helper blocks as specified by the Handlebars.js site.