How does one use a literal {{ in a Mustache template?
You can use {{
by itself quite easily. If you are trying to document something like {{example}}
you could always pass in the first two cur lies with your data.
orphaned curlies are easy {{ <br>
{{curly}}example}} curlies are harder
Some simple rendering:
var data = { 'curly' : '{{'},
tpl = $('#curly').html(),
html = Mustache.to_html(tpl, data);
document.write(html);
Results in:
orphaned curlies are easy {{
{{example}} curlies are harder
Here's the full working jsFiddle
Just change the delimiters temporarily:
{{=<% %>=}}
{{Look at the curlies!}}
<%={{ }}=%>
Assuming you are outputting HTML you could use an HTML entity to avoid it (mustache doesn't have any way to escape the opening tag built in).
So to output {{
you would write {{
.
To output <%
you would write <%
.