mustache / spec

The Mustache spec.
MIT License
368 stars 71 forks source link

Special sections: Comment and Literal #17

Closed kevburnsjr closed 13 years ago

kevburnsjr commented 13 years ago

Special section tags do not contain content referring to a context and therefore do no require name resolution: 1) If the name is "!", the section is a comment block. 2) If the name is "`", the section is a literal block.

# Comment Sections
data:     { bro: "dawg" }
template: "{{#!}}Don't render me, {{bro}}.{{/!}}"
expected: ""
# Literal Sections
data:     { foo: "bar" }
template: 'var tpl = "{{#`}}<span>{{foo}}</span>{{/`}}";'
expected: 'var tpl = "<span>{{foo}}</span>";'