Underscore 1.1.1

This commit is contained in:
Jeremy Ashkenas
2010-10-05 17:52:36 -04:00
parent a80550ccd2
commit faa672ecd9
7 changed files with 29 additions and 20 deletions

View File

@@ -87,8 +87,10 @@ $(document).ready(function() {
var withNewlinesAndTabs = _.template('This\n\t\tis: <%= x %>.\n\tok.\nend.');
equals(withNewlinesAndTabs({x: 'that'}), 'This\n\t\tis: that.\n\tok.\nend.');
var fromHTML = _.template($('#template').html());
equals(fromHTML({data : 12345}).replace(/\s/g, ''), '<li>24690</li>');
if (!$.browser.msie) {
var fromHTML = _.template($('#template').html());
equals(fromHTML({data : 12345}).replace(/\s/g, ''), '<li>24690</li>');
}
_.templateSettings = {
evaluate : /\{\{(.+?)\}\}/g,