diff options
author | Julian Gonggrijp <dev@juliangonggrijp.com> | 2021-07-05 16:13:50 +0200 |
---|---|---|
committer | Julian Gonggrijp <dev@juliangonggrijp.com> | 2021-07-05 16:13:50 +0200 |
commit | b2c18e51fd55d5f15a0a51048d4a70a6016740cd (patch) | |
tree | d711307f4d0e91f6883412f9d8853134a459e909 | |
parent | 977b9e794af57d4dd8f28a8191ac3d38ca4c8224 (diff) | |
download | mustache-spec-b2c18e51fd55d5f15a0a51048d4a70a6016740cd.tar.gz |
Update JSON accordingly
-rw-r--r-- | specs/~inheritance.json | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/specs/~inheritance.json b/specs/~inheritance.json index fedb34b..0a6878b 100644 --- a/specs/~inheritance.json +++ b/specs/~inheritance.json @@ -230,6 +230,21 @@ "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." } ] } |