Updated templateSettings regexes in tests, replacing the . with [\s\S]

This commit is contained in:
Ryan W Tenney
2010-10-05 22:34:24 -04:00
parent 2de76e065e
commit 81ce3ee0bd

View File

@@ -93,8 +93,8 @@ $(document).ready(function() {
} }
_.templateSettings = { _.templateSettings = {
evaluate : /\{\{(.+?)\}\}/g, evaluate : /\{\{([\s\S]+?)\}\}/g,
interpolate : /\{\{=(.+?)\}\}/g interpolate : /\{\{=([\s\S]+?)\}\}/g
}; };
var custom = _.template("<ul>{{ for (key in people) { }}<li>{{= people[key] }}</li>{{ } }}</ul>"); var custom = _.template("<ul>{{ for (key in people) { }}<li>{{= people[key] }}</li>{{ } }}</ul>");
@@ -108,8 +108,8 @@ $(document).ready(function() {
equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'.");
_.templateSettings = { _.templateSettings = {
evaluate : /<\?(.+?)\?>/g, evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<\?=(.+?)\?>/g interpolate : /<%=([\s\S]+?)%>/g
}; };
var customWithSpecialChars = _.template("<ul><? for (key in people) { ?><li><?= people[key] ?></li><? } ?></ul>"); var customWithSpecialChars = _.template("<ul><? for (key in people) { ?><li><?= people[key] ?></li><? } ?></ul>");