소스 검색

allow tag-free templates. Closes http://github.com/janl/mustache.js/issues#issue/9

tags/0.2.2
Jan Lehnardt 16 년 전
부모
커밋
88ddf16cec
4개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -0
      examples/empty_template.html
  2. +1
    -0
      examples/empty_template.js
  3. +1
    -0
      examples/empty_template.txt
  4. +5
    -1
      mustache.js

+ 1
- 0
examples/empty_template.html 파일 보기

@@ -0,0 +1 @@
<html><head></head><body><h1>Test</h1></body></html>

+ 1
- 0
examples/empty_template.js 파일 보기

@@ -0,0 +1 @@
var empty_template = {};

+ 1
- 0
examples/empty_template.txt 파일 보기

@@ -0,0 +1 @@
<html><head></head><body><h1>Test</h1></body></html>

+ 5
- 1
mustache.js 파일 보기

@@ -21,7 +21,11 @@ var Mustache = function() {
render: function(template, context, partials, in_recursion) {
// fail fast
if(template.indexOf(this.otag) == -1) {
return template;
if(in_recursion) {
return template;
} else {
this.send(template);
}
}

if(!in_recursion) {


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