소스 검색

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>

불러오는 중...
취소
저장