Fixes #411. Partially adding _.templateSettings could break template strings containing the words 'null' or 'undefined'.

This commit is contained in:
Jeremy Ashkenas
2012-01-04 16:00:36 -05:00
parent 7157d0187f
commit 69ed6177ab
3 changed files with 16 additions and 7 deletions

View File

@@ -144,6 +144,9 @@ $(document).ready(function() {
var mustache = _.template("Hello {{planet}}!");
equals(mustache({planet : "World"}), "Hello World!", "can mimic mustache.js");
var templateWithNull = _.template("a null undefined {{planet}}");
equals(templateWithNull({planet : "world"}), "a null undefined world", "can handle missing escape and evaluate settings");
});
});