Kaynağa Gözat

Documents use of string literals containing double quotes

tags/v2.1.3
John F. Mercer 10 yıl önce
ebeveyn
işleme
d0770de5be
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. +6
    -0
      README.md

+ 6
- 0
README.md Dosyayı Görüntüle

@@ -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. 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: View:


```json ```json
@@ -123,6 +125,9 @@ Template:
* {{company}} * {{company}}
* {{{company}}} * {{{company}}}
* {{&company}} * {{&company}}
{{=<% %>=}}
* {{company}}
<%={{ }}=%>
``` ```


Output: Output:
@@ -133,6 +138,7 @@ Output:
* &lt;b&gt;GitHub&lt;/b&gt; * &lt;b&gt;GitHub&lt;/b&gt;
* <b>GitHub</b> * <b>GitHub</b>
* <b>GitHub</b> * <b>GitHub</b>
* {{company}}
``` ```


JavaScript's dot notation may be used to access keys that are properties of objects in a view. JavaScript's dot notation may be used to access keys that are properties of objects in a view.


Yükleniyor…
İptal
Kaydet