Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force_current example is not working #19

Open
bezmenov opened this issue May 2, 2011 · 1 comment
Open

force_current example is not working #19

bezmenov opened this issue May 2, 2011 · 1 comment

Comments

@bezmenov
Copy link

bezmenov commented May 2, 2011

force_current example is not working

  1. {#person}{.root}: {name}, {age}{/person}
  2. {
    "root": "Subject",
    "person": {
    "name": "Larry",
    "age": 45
    }
    }
  3. : Larry, 45

The correct (4) result must be: Subject: Larry, 45

Regards: Evgeni

@welwood08
Copy link

To quote the guide: "to constrain lookups to the current section scope: {.foo}". In other words, the example is correct - there is no 'root' in the 'person' scope and the '.' specifically instructs dust not to search parent scopes, so it renders an empty string for '{.root}'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants