kof/node-jqtpl — pull request #44 by tikonen (2011-12-01 14:38:08+00:00)
Title: Default value support for evaluation expression

Our templates are full code like this

{{if some_var}}

${some_var}

{{else}}

Something

{{/if}}

This is not very readable, so I implemented a default value support for variable expression

${some_var|"Something"}

and it supports variables as default value.

${some_var|other_var}

Commit has unit test code, but I spent nearly hour trying to get qunit up and running with node 0.4 and gave up. The change was tested by ad hoc scripts and of course using it with our existing templates but no idea if all unit tests pass.