Преглед изворни кода

Merge remote-tracking branch 'upstream/master'

tags/0.7.1
Michael Jackson пре 13 година
родитељ
комит
829698388c
4 измењених фајлова са 11 додато и 1 уклоњено
  1. +2
    -1
      mustache.js
  2. +7
    -0
      test/_files/check_falsy.js
  3. +1
    -0
      test/_files/check_falsy.mustache
  4. +1
    -0
      test/_files/check_falsy.txt

+ 2
- 1
mustache.js Прегледај датотеку

@@ -254,7 +254,8 @@ var Mustache;
return self.render(template, context);
};

return value.call(context.view, text, scopedRender) || "";
var result = value.call(context.view, text, scopedRender);
return result != null ? result : "";
default:
if (value) {
return callback(this, context);


+ 7
- 0
test/_files/check_falsy.js Прегледај датотеку

@@ -0,0 +1,7 @@
({
number: function(text, render) {
return function(text, render) {
return +render(text);
}
}
})

+ 1
- 0
test/_files/check_falsy.mustache Прегледај датотеку

@@ -0,0 +1 @@
<p>{{#number}}0{{/number}}</p>

+ 1
- 0
test/_files/check_falsy.txt Прегледај датотеку

@@ -0,0 +1 @@
<p>0</p>

Loading…
Откажи
Сачувај