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 = {
evaluate : /\{\{(.+?)\}\}/g,
interpolate : /\{\{=(.+?)\}\}/g
evaluate : /\{\{([\s\S]+?)\}\}/g,
interpolate : /\{\{=([\s\S]+?)\}\}/g
};
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'.");
_.templateSettings = {
evaluate : /<\?(.+?)\?>/g,
interpolate : /<\?=(.+?)\?>/g
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g
};
var customWithSpecialChars = _.template("<ul><? for (key in people) { ?><li><?= people[key] ?></li><? } ?></ul>");