Skip to content

Commit b2c18e5

Browse files
committed
Update JSON accordingly
1 parent 977b9e7 commit b2c18e5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

specs/~inheritance.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,21 @@
230230
"parent": "{{$foo}}default content{{/foo}}"
231231
},
232232
"expected": "default content"
233+
},
234+
{
235+
"name": "Block scope",
236+
"desc": "Scope of a substituted block is evaluated in the context of the parent template",
237+
"data": {
238+
"fruit": "apples",
239+
"nested": {
240+
"fruit": "bananas"
241+
}
242+
},
243+
"template": "{{<parent}}{{$block}}I say {{fruit}}.{{/block}}{{/parent}}",
244+
"partials": {
245+
"parent": "{{#nested}}{{$block}}You say {{fruit}}.{{/block}}{{/nested}}"
246+
},
247+
"expected": "I say bananas."
233248
}
234249
]
235250
}

0 commit comments

Comments
 (0)