man/mustache.5.ron in mustache-0.99.5 vs man/mustache.5.ron in mustache-0.99.6
- old
+ new
@@ -48,11 +48,13 @@
### Variables
The most basic tag type is the variable. A `{{name}}` tag in a basic
template will try to find the `name` key in the current context. If
-there is no `name` key, nothing will be rendered.
+there is no `name` key, the parent contexts will be checked recursively.
+If the top context is reached and the `name` key is still not found,
+nothing will be rendered.
All variables are HTML escaped by default. If you want to return
unescaped HTML, use the triple mustache: `{{{name}}}`.
You can also use `&` to unescape a variable: `{{& name}}`. This may be
@@ -100,18 +102,18 @@
list, the HTML between the pound and slash will not be displayed.
Template:
Shown.
- {{#nothin}}
+ {{#person}}
Never shown!
- {{/nothin}}
+ {{/person}}
Hash:
{
- "person": true,
+ "person": false
}
Output:
Shown.
@@ -136,11 +138,11 @@
{
"repo": [
{ "name": "resque" },
{ "name": "hub" },
- { "name": "rip" },
+ { "name": "rip" }
]
}
Output:
@@ -165,11 +167,11 @@
Hash:
{
"name": "Willy",
"wrapped": function() {
- return function(text) {
+ return function(text, render) {
return "<b>" + render(text) + "</b>"
}
}
}
@@ -319,6 +321,6 @@
## SEE ALSO
mustache(1),
-<http://mustache.github.com/>
+<http://mustache.github.io/>