diff --git a/README.md b/README.md index 748d702..4b28ad0 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,8 @@ The most basic tag type is a simple variable. A `{{name}}` tag renders the value All variables are HTML-escaped by default. If you want to render unescaped HTML, use the triple mustache: `{{{name}}}`. You can also use `&` to unescape a variable. +To print `{{name}}` as a string literal, the default delimiters must be changed. See the ["Set Delimiter'](https://github.com/janl/mustache.js#set-delimiter) section for more information about custom delimiters. + View: ```json @@ -123,6 +125,9 @@ Template: * {{company}} * {{{company}}} * {{&company}} +{{=<% %>=}} +* {{company}} +<%={{ }}=%> ``` Output: @@ -133,6 +138,7 @@ Output: * <b>GitHub</b> * GitHub * GitHub +* {{company}} ``` JavaScript's dot notation may be used to access keys that are properties of objects in a view.