How does one use a literal {{ in a Mustache template?

dbkaplun picture dbkaplun · Jun 15, 2012 · Viewed 11.1k times · Source

How does one use a literal "{{" in a Mustache template?

On a side note, if I'm using custom tags, like <% and %>, is there a way to write "<%"?

Theoretically, I could use different tags, but I have too much code written using {{ and }} to change it all.

Answer

theK42 picture theK42 · Dec 4, 2012

Just change the delimiters temporarily:

{{=<% %>=}}
{{Look at the curlies!}}
<%={{ }}=%>