Warning, /frameworks/syntax-highlighting/autotests/input/test.mustache is written in an unsupported language. File is not indexed.
0001 <!-- Mustache / Handlebars / Ractive template -->
0002 <!DOCTYPE html>
0003 <html>
0004 <head>
0005 <meta charset="UTF-8" />
0006 <title>{{title}}</title>
0007 </head>
0008 <!-- CSS -->
0009 <style>
0010 /* Mustache variable support in CSS is incomplete */
0011 {{mustache}}
0012 [ {{other}} ]
0013 body {
0014 {{{other}}}
0015 font-size: 15pt;
0016 font-family: Verdana;
0017 }
0018 </style>
0019 <!-- JavaScript -->
0020 <script>
0021 var foo = {{bar}};
0022 `template {{foo}} ${ var a = {{b}} }`
0023 </script>
0024
0025 <body>
0026 {{#movie}}
0027 <div>
0028 <h1>{{title}}</h1>
0029 <img src="{{poster}}" alt="{{title}}"/>
0030 </div>
0031 <div>
0032 Rating - {{ratings.critics_rating}}
0033 </div>
0034 {{/movie}}
0035 {{^movie}}
0036 <div>
0037 Movie Does Not Exist :(
0038 </div>
0039 {{/movie}}
0040 {{! this is a comment TODO ALERT }}
0041
0042 This is a partial {{> partial1 }}
0043 {{#block
0044 param=foo
0045 param2=bar}}
0046 {{block foo=bar}}
0047 {{/block}}
0048
0049 <!-- Handlebars -->
0050
0051 {{#list people}}{{firstName}} {{lastName}}{{/list}}
0052 {{#noop}}{{body}}{{/noop}}
0053 {{#with story}}
0054 <div class="intro">{{{intro}}}</div>
0055 <div class="body">{{{body}}}</div>
0056 {{/with}}
0057 {{#each comments}}
0058 <div class="comment">
0059 <h2>{{subject}}</h2>
0060 {{{body}}}
0061 </div>
0062 {{/each}}
0063 {{#list nav}}
0064 <a href="{{url}}">{{title}}</a>
0065 {{/list}}
0066
0067 {{!-- Conditionals --}}
0068 {{#if isActive}}
0069 <img src="star.gif" alt="Active">
0070 {{else if isInactive}}
0071 <img src="cry.gif" alt="Inactive">
0072 {{else}}
0073 <img src="cry.gif" alt="">
0074 {{/if}}
0075
0076 {{!-- Escaping --}}
0077 \{{escaped}}
0078 {{{{raw}}}}
0079 {{escaped}}
0080 {{{{/raw}}}}
0081
0082 {{!-- Whitespace Control --}}
0083 {{#each nav ~}}
0084 <a href="{{url}}">
0085 {{~#if test}}
0086 {{~title}}
0087 {{~^~}}
0088 Empty
0089 {{~/if~}}
0090 </a>
0091 {{~/each}}
0092
0093 {{!-- Helpers --}}
0094 {{link "See more..." story.url}}
0095 {{log "Look at me!" level="error"}}
0096
0097 {{!-- Partial --}}
0098 {{> myPartial name=../name }}
0099 {{#> myPartial }}
0100 Failover content
0101 {{/myPartial}}
0102 {{#*inline "myPartial"}}
0103 My Content
0104 {{/inline}}
0105 {{#each children}}
0106 {{> myPartial}}
0107 {{/each}}
0108
0109 <!-- Delimiters in tags (folding) -->
0110 word<div>word
0111
0112 word</div>word
0113
0114 </body>
0115 </html>