From d0770de5be95dc39a469a422cb24609f75387f68 Mon Sep 17 00:00:00 2001 From: "John F. Mercer" Date: Thu, 16 Jul 2015 12:59:59 -0400 Subject: [PATCH] Documents use of string literals containing double quotes --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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.