forked from janl/mustache.js
-
Notifications
You must be signed in to change notification settings - Fork 2
Syntax Comments
Sahab Yazdani edited this page Nov 14, 2011
·
2 revisions
Comments in Mustache are started with the {{!
token and ended with the !}}
token. Comments can be started anywhere in code and can finish anywhere in code (that is, comments can be multilined and can traverse across other Mustache tags). Comments obey the Change Delimiter command.
{{!Single-line comment !}}
{{!
This is a multi-line comment
!}}
{{!
Comments can comment out {{mustache}} {{#code}}{{/code}}
!}}
{{=~~ ~~=}}
~~! Comments obey the delimiter change token !~~
~~={{ }}=~~
Note that although these comments are Mustache Spec-conformant, the reverse is not true since the end token of !}}
is required. That means that comments written for other flavours of Mustache will not be parsed correctly by this implementation.