浏览代码

Merge branch 'master' of git@github.com:janl/mustache.js

* 'master' of git@github.com:janl/mustache.js:
  0eeab10b64
  Fixing some README.md errors
tags/0.2.2
Jan Lehnardt 16 年前
父节点
当前提交
0070903cfd
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      README.md

+ 4
- 4
README.md 查看文件

@@ -74,7 +74,7 @@ mustache.js supports a quite powerful but yet simple view partial mechanism. Use
}
};

var template = "Welcome, {{jow}}! {{<winnings}}"
var template = "Welcome, {{name}}! {{>winnings}}"
var partials = {winnings: "You just won ${{value}} (which is ${{taxed_value}} after tax)"};
var output = Mustache.to_html(template, view, partials)
@@ -82,9 +82,9 @@ mustache.js supports a quite powerful but yet simple view partial mechanism. Use
output will be:
Welcome, Joe! You just won $1000 (which is $600 after tax)

You invoke a partial with `{{<name}}`. Invoking the partial `name` will tell
mustache.js to look for a object in the context's property `name`. It will then
use that object as the context for the template found in `partials` for `name`.
You invoke a partial with `{{<winnings}}`. Invoking the partial `winnings` will tell
mustache.js to look for a object in the context's property `winnings`. It will then
use that object as the context for the template found in `partials` for `winnings`.

## Escaping
mustache.js does escape all values when using the standard double mustache syntax. Characters which will be escaped: `& \ " < >`. To disable escaping, simply use tripple mustaches like `{{{unescaped_variable}}}`.


正在加载...
取消
保存