diff --git a/mustache.js b/mustache.js index af8c2ab..36a478a 100644 --- a/mustache.js +++ b/mustache.js @@ -610,5 +610,4 @@ var Mustache; } return exports; - }()))); diff --git a/test/_files/grandparent_context.js b/test/_files/grandparent_context.js new file mode 100644 index 0000000..97dbfd3 --- /dev/null +++ b/test/_files/grandparent_context.js @@ -0,0 +1,19 @@ +({ + grand_parent_id: 'grand_parent1', + parent_contexts: [ + { + parent_id: 'parent1', + child_contexts: [ + { child_id: 'parent1-child1' }, + { child_id: 'parent1-child2' } + ] + }, + { + parent_id: 'parent2', + child_contexts: [ + { child_id: 'parent2-child1' }, + { child_id: 'parent2-child2' } + ] + } + ] +}) diff --git a/test/_files/grandparent_context.mustache b/test/_files/grandparent_context.mustache new file mode 100644 index 0000000..e6c07a2 --- /dev/null +++ b/test/_files/grandparent_context.mustache @@ -0,0 +1,10 @@ +{{grand_parent_id}} +{{#parent_contexts}} +{{grand_parent_id}} +{{parent_id}} +{{#child_contexts}} +{{grand_parent_id}} +{{parent_id}} +{{child_id}} +{{/child_contexts}} +{{/parent_contexts}} diff --git a/test/_files/grandparent_context.txt b/test/_files/grandparent_context.txt new file mode 100644 index 0000000..64996ad --- /dev/null +++ b/test/_files/grandparent_context.txt @@ -0,0 +1,17 @@ +grand_parent1 +grand_parent1 +parent1 +grand_parent1 +parent1 +parent1-child1 +grand_parent1 +parent1 +parent1-child2 +grand_parent1 +parent2 +grand_parent1 +parent2 +parent2-child1 +grand_parent1 +parent2 +parent2-child2