소스 검색

Make IMPLICIT ITERATORS a first class feature.

Closes #39.
tags/0.3.0
Jan Lehnardt 16 년 전
부모
커밋
5c08642838
5개의 변경된 파일5개의 추가작업 그리고 8개의 파일을 삭제
  1. +0
    -1
      examples/array_of_partials_implicit_partial.html
  2. +0
    -1
      examples/array_of_strings.html
  3. +0
    -2
      examples/array_partial.2.html
  4. +0
    -2
      examples/array_partial.txt
  5. +5
    -2
      mustache.js

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

@@ -1,5 +1,4 @@
Here is some stuff!
{{%IMPLICIT-ITERATOR}}
{{#numbers}}
{{>partial}}
{{/numbers}}

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

@@ -1,2 +1 @@
{{%IMPLICIT-ITERATOR}}
{{#array_of_strings}} {{.}} {{/array_of_strings}}

+ 0
- 2
examples/array_partial.2.html 파일 보기

@@ -1,6 +1,4 @@
Here's a non-sense array of values

{{%IMPLICIT-ITERATOR}}
{{#array}}
{{.}}
{{/array}}

+ 0
- 2
examples/array_partial.txt 파일 보기

@@ -1,6 +1,4 @@
Here's a non-sense array of values


1
2
3


+ 5
- 2
mustache.js 파일 보기

@@ -260,8 +260,11 @@ var Mustache = function() {
create_context: function(_context) {
if(this.is_object(_context)) {
return _context;
} else if(this.pragmas["IMPLICIT-ITERATOR"]) {
var iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator || ".";
} else {
var iterator = ".";
if(this.pragmas["IMPLICIT-ITERATOR"]) {
iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
}
var ctx = {};
ctx[iterator] = _context;
return ctx;


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