diff options
Diffstat (limited to 'specs/~inheritance.yml')
-rw-r--r-- | specs/~inheritance.yml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/specs/~inheritance.yml b/specs/~inheritance.yml index 07fa081..5a24ba8 100644 --- a/specs/~inheritance.yml +++ b/specs/~inheritance.yml @@ -224,3 +224,14 @@ tests: partials: parent: "{{$foo}}default content{{/foo}}" expected: default content + + - name: Block scope + desc: Scope of a substituted block is evaluated in the context of the parent template + data: + fruit: apples + nested: + fruit: bananas + template: "{{<parent}}{{$block}}I say {{fruit}}.{{/block}}{{/parent}}" + partials: + parent: "{{#nested}}{{$block}}You say {{fruit}}.{{/block}}{{/nested}}" + expected: I say bananas. |