diff options
author | Julian Gonggrijp <dev@juliangonggrijp.com> | 2021-07-05 16:13:50 +0200 |
---|---|---|
committer | root <root@delphi.lan> | 2022-08-08 21:08:57 +0200 |
commit | 4d6505fd966558c1bd0948847f68f38d8c952299 (patch) | |
tree | c707afc51d35c022ccc75d5761af5d49754b8d01 | |
parent | 7a4d919d9dc43453524477470a4f217d11b94e24 (diff) | |
download | mustache-spec-4d6505fd966558c1bd0948847f68f38d8c952299.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." } ] } |