making interpolate/evaluate more clear.

This commit is contained in:
Jeremy Ashkenas
2011-02-28 11:36:14 -05:00
parent 513d322525
commit 59ef91ee80

View File

@@ -1111,7 +1111,9 @@ compiled({epithet: "stooge"});
If ERB-style delimiters aren't your cup of tea, you can change Underscore's If ERB-style delimiters aren't your cup of tea, you can change Underscore's
template settings to use different symbols to set off interpolated code. template settings to use different symbols to set off interpolated code.
Define an <b>interpolate</b> regex, and an (optional) <b>evaluate</b> regex Define an <b>interpolate</b> regex, and an (optional) <b>evaluate</b> regex
to match expressions that should be inserted and evaluated, respectively. to match expressions that should be inserted and evaluated, respectively.
If no <b>evaluate</b> regex is provided, your templates will only be
capable of interpolating values.
For example, to perform For example, to perform
<a href="http://github.com/janl/mustache.js#readme">Mustache.js</a> <a href="http://github.com/janl/mustache.js#readme">Mustache.js</a>
style templating: style templating: