How does one use a literal {{ in a Mustache template?
问题 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. 回答1: Just change the delimiters temporarily: {{=<% %>=}} {{Look at the curlies!}} <%={{ }}=%> 回答2: 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).