Where did you read this about the parent context? Maybe I’m blind to see it. 
That would explain why I didn’t see it when implementing it :)

Norbert

> Am 13.08.2018 um 10:24 schrieb Peter Uhnák <[email protected]>:
> 
> Hi,
> 
> I'm using Mustache for Pharo, and according to mustache docs ( 
> https://mustache.github.io/mustache.5.html 
> <https://mustache.github.io/mustache.5.html> ), when a key is not found, it 
> should look into parents contexts.
> 
> However that does not seem to be the case:
> 
> str := '{{root}}
> {{#items}}
> {{root}}.{{name}}
> {{/items}}'.
> 
> data := {
>       'root' -> 'ROOT'.
>       'items' -> {
>               { 'name' -> 'first' } asDictionary.
>               { 'name' -> 'second' } asDictionary.
>       }
> } asDictionary.
> 
> (MustacheTemplate on: str) value: data.
> 
> I should get "ROOT.first", etc., but instead I get ".first", ".second".
> 
> Thanks,
> Peter
> 

Reply via email to