jlongster/nunjucks — pull request #48 by fooby (2013-01-24 06:44:21+00:00)
Title: Fix for int/float filters returning "undefined" when passed a string of "0"

Two fixes, but only the filters one is important:

* The 'int' and 'float' filters don't really work as expected when processing the string '0'. The result is the undefined value instead of 0. Along with the fix, the optional default value is returned if the parsing results in NaN (see tests).

* Normalize FileSystemLoader paths to work with windows path separators.

e.g. when running the the tests, the FileSystemLoader doesn't load templates because `p` contains `tests\templates\base.html` (caused by path.join normalizing the result) while `paths[i]` contains `tests/templates`.