Allow natural multi-line code evaluation in templates.

By escaping `\r`, `\n`, and `\t` earlier, we can unescape
them along with backslashes and single quotes allowing
for the inclusion of single line comments and code without
a terminating semicolon.
This commit is contained in:
Brad Dunbar
2012-03-11 12:39:13 -04:00
parent 34305bc85d
commit 414fafb1f4
3 changed files with 29 additions and 11 deletions

View File

@@ -1,6 +1,14 @@
$(document).ready(function() {
module("Utility");
var templateSettings = _.templateSettings;
module("Utility", {
teardown: function() {
_.templateSettings = templateSettings;
}
});
test("utility: noConflict", function() {
var underscore = _.noConflict();