Changeset View
Changeset View
Standalone View
Standalone View
autotests/reference/test.mustache.ref
- This file was added.
1 | <Comment><!-- Mustache / Handlebars / Ractive template --></Comment><br/> | ||||
---|---|---|---|---|---|
2 | <Doctype><!DOCTYPE </Doctype><Normal Text>html</Normal Text><Doctype>></Doctype><br/> | ||||
3 | <Element Tag><html></Element Tag><br/> | ||||
4 | <Normal Text> </Normal Text><Element Tag><head></Element Tag><br/> | ||||
5 | <Normal Text> </Normal Text><Element Tag><meta</Element Tag><Attribute> charset</Attribute><Symbol>=</Symbol><Value>"UTF-8"</Value><Normal Text> </Normal Text><Element Tag>/></Element Tag><br/> | ||||
6 | <Normal Text> </Normal Text><Element Tag><title></Element Tag><Mustache Variable>{{</Mustache Variable><Mustache Inside>title</Mustache Inside><Mustache Variable>}}</Mustache Variable><Element Tag></title></Element Tag><br/> | ||||
7 | <Normal Text> </Normal Text><Element Tag></head></Element Tag><br/> | ||||
8 | <Normal Text> </Normal Text><Comment><!-- CSS --></Comment><br/> | ||||
9 | <Normal Text> </Normal Text><Element Tag><style></Element Tag><br/> | ||||
10 | <Normal Text> </Normal Text><Comment>/* Mustache variable support in CSS is incomplete */</Comment><br/> | ||||
11 | <Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>mustache</Mustache Inside><Mustache Variable>}}</Mustache Variable><br/> | ||||
12 | <Normal Text> </Normal Text><CSS: Selector Attribute>[ </CSS: Selector Attribute><Mustache Variable>{{</Mustache Variable><Mustache Inside>other</Mustache Inside><Mustache Variable>}}</Mustache Variable><CSS: Selector Attribute> ]</CSS: Selector Attribute><br/> | ||||
13 | <Normal Text> </Normal Text><Selector Tag>body</Selector Tag><Normal Text> </Normal Text><Normal Text>{</Normal Text><br/> | ||||
14 | <Normal Text> </Normal Text><Mustache Variable Unescape>{{{</Mustache Variable Unescape><Mustache Inside>other</Mustache Inside><Mustache Variable Unescape>}}}</Mustache Variable Unescape><br/> | ||||
15 | <Normal Text> </Normal Text><Property>font-size</Property><Normal Text>: </Normal Text><Number>15</Number><Unit>pt</Unit><Separator Symbol>;</Separator Symbol><br/> | ||||
16 | <Normal Text> </Normal Text><Property>font-family</Property><Normal Text>: Verdana</Normal Text><Separator Symbol>;</Separator Symbol><br/> | ||||
17 | <Normal Text> }</Normal Text><br/> | ||||
18 | <Normal Text> </Normal Text><Element Tag></style></Element Tag><br/> | ||||
19 | <Normal Text> </Normal Text><Comment><!-- JavaScript --></Comment><br/> | ||||
20 | <Normal Text> </Normal Text><Element Tag><script></Element Tag><br/> | ||||
21 | <Normal Text> </Normal Text><Keyword>var</Keyword><Normal Text> foo </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>bar</Mustache Inside><Mustache Variable>}}</Mustache Variable><Symbol>;</Symbol><br/> | ||||
22 | <Normal Text> </Normal Text><JS: Template>`template </JS: Template><Mustache Variable>{{</Mustache Variable><Mustache Inside>foo</Mustache Inside><Mustache Variable>}}</Mustache Variable><JS: Template> </JS: Template><JS: Substitution>${</JS: Substitution><Normal Text> </Normal Text><Keyword>var</Keyword><Normal Text> </Normal Text><Normal Text>a </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>b</Mustache Inside><Mustache Variable>}}</Mustache Variable><Normal Text> </Normal Text><JS: Substitution>}</JS: Substitution><JS: Template>`</JS: Template><br/> | ||||
23 | <Normal Text> </Normal Text><Element Tag></script></Element Tag><br/> | ||||
24 | <Normal Text></Normal Text><br/> | ||||
25 | <Normal Text> </Normal Text><Element Tag><body></Element Tag><br/> | ||||
26 | <Normal Text> </Normal Text><Mustache Block>{{#movie}}</Mustache Block><br/> | ||||
27 | <Normal Text> </Normal Text><Element Tag><div></Element Tag><br/> | ||||
28 | <Normal Text> </Normal Text><Element Tag><h1></Element Tag><Mustache Variable>{{</Mustache Variable><Mustache Inside>title</Mustache Inside><Mustache Variable>}}</Mustache Variable><Element Tag></h1></Element Tag><br/> | ||||
29 | <Normal Text> </Normal Text><Element Tag><img</Element Tag><Attribute> src</Attribute><Symbol>=</Symbol><Value>"</Value><Mustache Variable>{{</Mustache Variable><Mustache Inside>poster</Mustache Inside><Mustache Variable>}}</Mustache Variable><Value>"</Value><Attribute> alt</Attribute><Symbol>=</Symbol><Value>"</Value><Mustache Variable>{{</Mustache Variable><Mustache Inside>title</Mustache Inside><Mustache Variable>}}</Mustache Variable><Value>"</Value><Element Tag>/></Element Tag><br/> | ||||
30 | <Normal Text> </Normal Text><Element Tag></div></Element Tag><br/> | ||||
31 | <Normal Text> </Normal Text><Element Tag><div></Element Tag><br/> | ||||
32 | <Normal Text> Rating - </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>ratings</Mustache Inside><Symbol>.</Symbol><Mustache Inside>critics_rating</Mustache Inside><Mustache Variable>}}</Mustache Variable><br/> | ||||
33 | <Normal Text> </Normal Text><Element Tag></div></Element Tag><br/> | ||||
34 | <Normal Text> </Normal Text><Mustache Block>{{/movie}}</Mustache Block><br/> | ||||
35 | <Normal Text> </Normal Text><Mustache Block>{{^movie}}</Mustache Block><br/> | ||||
36 | <Normal Text> </Normal Text><Element Tag><div></Element Tag><br/> | ||||
37 | <Normal Text> Movie Does Not Exist :(</Normal Text><br/> | ||||
38 | <Normal Text> </Normal Text><Element Tag></div></Element Tag><br/> | ||||
39 | <Normal Text> </Normal Text><Mustache Block>{{/movie}}</Mustache Block><br/> | ||||
40 | <Normal Text> </Normal Text><Comment>{{! this is a comment </Comment><Alert Level 2>TODO</Alert Level 2><Comment> </Comment><Alert Level 1>ALERT</Alert Level 1><Comment> }}</Comment><br/> | ||||
41 | <Normal Text></Normal Text><br/> | ||||
42 | <Normal Text> This is a partial </Normal Text><Mustache Variable>{{></Mustache Variable><Mustache Partial> partial1 </Mustache Partial><Mustache Variable>}}</Mustache Variable><br/> | ||||
43 | <Normal Text> </Normal Text><Mustache Block>{{#block</Mustache Block><br/> | ||||
44 | <Mustache Inside> </Mustache Inside><Attribute> param</Attribute><Symbol>=</Symbol><Mustache Inside>foo</Mustache Inside><br/> | ||||
45 | <Mustache Inside> </Mustache Inside><Attribute> param2</Attribute><Symbol>=</Symbol><Mustache Inside>bar</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
46 | <Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>block</Mustache Inside><Attribute> foo</Attribute><Symbol>=</Symbol><Mustache Inside>bar</Mustache Inside><Mustache Variable>}}</Mustache Variable><br/> | ||||
47 | <Normal Text> </Normal Text><Mustache Block>{{/block}}</Mustache Block><br/> | ||||
48 | <Normal Text></Normal Text><br/> | ||||
49 | <Normal Text> </Normal Text><Comment><!-- Handlebars --></Comment><br/> | ||||
50 | <Normal Text></Normal Text><br/> | ||||
51 | <Normal Text> </Normal Text><Mustache Block>{{#list</Mustache Block><Mustache Inside> people</Mustache Inside><Mustache Block>}}</Mustache Block><Mustache Variable>{{</Mustache Variable><Mustache Inside>firstName</Mustache Inside><Mustache Variable>}}</Mustache Variable><Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>lastName</Mustache Inside><Mustache Variable>}}</Mustache Variable><Mustache Block>{{/list}}</Mustache Block><br/> | ||||
52 | <Normal Text> </Normal Text><Mustache Block>{{#noop}}</Mustache Block><Mustache Variable>{{</Mustache Variable><Mustache Inside>body</Mustache Inside><Mustache Variable>}}</Mustache Variable><Mustache Block>{{/noop}}</Mustache Block><br/> | ||||
53 | <Normal Text> </Normal Text><Mustache Block>{{#with</Mustache Block><Mustache Inside> story</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
54 | <Normal Text> </Normal Text><Element Tag><div</Element Tag><Attribute> class</Attribute><Symbol>=</Symbol><Value>"intro"</Value><Element Tag>></Element Tag><Mustache Variable Unescape>{{{</Mustache Variable Unescape><Mustache Inside>intro</Mustache Inside><Mustache Variable Unescape>}}}</Mustache Variable Unescape><Element Tag></div></Element Tag><br/> | ||||
55 | <Normal Text> </Normal Text><Element Tag><div</Element Tag><Attribute> class</Attribute><Symbol>=</Symbol><Value>"body"</Value><Element Tag>></Element Tag><Mustache Variable Unescape>{{{</Mustache Variable Unescape><Mustache Inside>body</Mustache Inside><Mustache Variable Unescape>}}}</Mustache Variable Unescape><Element Tag></div></Element Tag><br/> | ||||
56 | <Normal Text> </Normal Text><Mustache Block>{{/with}}</Mustache Block><br/> | ||||
57 | <Normal Text> </Normal Text><Mustache Block>{{#each</Mustache Block><Mustache Inside> comments</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
58 | <Normal Text> </Normal Text><Element Tag><div</Element Tag><Attribute> class</Attribute><Symbol>=</Symbol><Value>"comment"</Value><Element Tag>></Element Tag><br/> | ||||
59 | <Normal Text> </Normal Text><Element Tag><h2></Element Tag><Mustache Variable>{{</Mustache Variable><Mustache Inside>subject</Mustache Inside><Mustache Variable>}}</Mustache Variable><Element Tag></h2></Element Tag><br/> | ||||
60 | <Normal Text> </Normal Text><Mustache Variable Unescape>{{{</Mustache Variable Unescape><Mustache Inside>body</Mustache Inside><Mustache Variable Unescape>}}}</Mustache Variable Unescape><br/> | ||||
61 | <Normal Text> </Normal Text><Element Tag></div></Element Tag><br/> | ||||
62 | <Normal Text> </Normal Text><Mustache Block>{{/each}}</Mustache Block><br/> | ||||
63 | <Normal Text> </Normal Text><Mustache Block>{{#list</Mustache Block><Mustache Inside> nav</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
64 | <Normal Text> </Normal Text><Element Tag><a</Element Tag><Attribute> href</Attribute><Symbol>=</Symbol><Value>"</Value><Mustache Variable>{{</Mustache Variable><Mustache Inside>url</Mustache Inside><Mustache Variable>}}</Mustache Variable><Value>"</Value><Element Tag>></Element Tag><Mustache Variable>{{</Mustache Variable><Mustache Inside>title</Mustache Inside><Mustache Variable>}}</Mustache Variable><Element Tag></a></Element Tag><br/> | ||||
65 | <Normal Text> </Normal Text><Mustache Block>{{/list}}</Mustache Block><br/> | ||||
66 | <Normal Text></Normal Text><br/> | ||||
67 | <Normal Text> </Normal Text><Comment>{{!-- Conditionals --}}</Comment><br/> | ||||
68 | <Normal Text> </Normal Text><Mustache Block>{{#if</Mustache Block><Mustache Inside> isActive</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
69 | <Normal Text> </Normal Text><Element Tag><img</Element Tag><Attribute> src</Attribute><Symbol>=</Symbol><Value>"star.gif"</Value><Attribute> alt</Attribute><Symbol>=</Symbol><Value>"Active"</Value><Element Tag>></Element Tag><br/> | ||||
70 | <Normal Text> </Normal Text><Mustache Block>{{else if</Mustache Block><Mustache Inside> isInactive</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
71 | <Normal Text> </Normal Text><Element Tag><img</Element Tag><Attribute> src</Attribute><Symbol>=</Symbol><Value>"cry.gif"</Value><Attribute> alt</Attribute><Symbol>=</Symbol><Value>"Inactive"</Value><Element Tag>></Element Tag><br/> | ||||
72 | <Normal Text> </Normal Text><Mustache Block>{{else}}</Mustache Block><br/> | ||||
73 | <Normal Text> </Normal Text><Element Tag><img</Element Tag><Attribute> src</Attribute><Symbol>=</Symbol><Value>"cry.gif"</Value><Attribute> alt</Attribute><Symbol>=</Symbol><Value>""</Value><Element Tag>></Element Tag><br/> | ||||
74 | <Normal Text> </Normal Text><Mustache Block>{{/if}}</Mustache Block><br/> | ||||
75 | <Normal Text></Normal Text><br/> | ||||
76 | <Normal Text> </Normal Text><Comment>{{!-- Escaping --}}</Comment><br/> | ||||
77 | <Normal Text> \{{escaped}}</Normal Text><br/> | ||||
78 | <Normal Text> </Normal Text><Mustache Block>{{{{raw}}}}</Mustache Block><br/> | ||||
79 | <Normal Text> {{escaped}}</Normal Text><br/> | ||||
80 | <Normal Text> </Normal Text><Mustache Block>{{{{/raw}}}}</Mustache Block><br/> | ||||
81 | <Normal Text></Normal Text><br/> | ||||
82 | <Normal Text> </Normal Text><Comment>{{!-- Whitespace Control --}}</Comment><br/> | ||||
83 | <Normal Text> </Normal Text><Mustache Block>{{#each</Mustache Block><Mustache Inside> nav ~</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
84 | <Normal Text> </Normal Text><Element Tag><a</Element Tag><Attribute> href</Attribute><Symbol>=</Symbol><Value>"</Value><Mustache Variable>{{</Mustache Variable><Mustache Inside>url</Mustache Inside><Mustache Variable>}}</Mustache Variable><Value>"</Value><Element Tag>></Element Tag><br/> | ||||
85 | <Normal Text> </Normal Text><Mustache Block>{{~#if</Mustache Block><Mustache Inside> test</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
86 | <Normal Text> </Normal Text><Mustache Variable>{{</Mustache Variable><Mustache Inside>~title</Mustache Inside><Mustache Variable>}}</Mustache Variable><br/> | ||||
87 | <Normal Text> </Normal Text><Mustache Block>{{~^</Mustache Block><Mustache Inside>~</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
88 | <Normal Text> Empty</Normal Text><br/> | ||||
89 | <Normal Text> </Normal Text><Mustache Block>{{~/if</Mustache Block><Mustache Inside>~</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
90 | <Normal Text> </Normal Text><Element Tag></a></Element Tag><br/> | ||||
91 | <Normal Text> </Normal Text><Mustache Block>{{~/each}}</Mustache Block><br/> | ||||
92 | <Normal Text></Normal Text><br/> | ||||
93 | <Normal Text> </Normal Text><Comment>{{!-- Helpers --}}</Comment><br/> | ||||
94 | <Normal Text> </Normal Text><Mustache Variable>{{link</Mustache Variable><Mustache Inside> </Mustache Inside><String>"See more..."</String><Mustache Inside> story</Mustache Inside><Symbol>.</Symbol><Mustache Inside>url</Mustache Inside><Mustache Variable>}}</Mustache Variable><br/> | ||||
95 | <Normal Text> </Normal Text><Mustache Variable>{{log</Mustache Variable><Mustache Inside> </Mustache Inside><String>"Look at me!"</String><Attribute> level</Attribute><Symbol>=</Symbol><String>"error"</String><Mustache Variable>}}</Mustache Variable><br/> | ||||
96 | <Normal Text></Normal Text><br/> | ||||
97 | <Normal Text> </Normal Text><Comment>{{!-- Partial --}}</Comment><br/> | ||||
98 | <Normal Text> </Normal Text><Mustache Variable>{{></Mustache Variable><Mustache Partial> myPartial</Mustache Partial><Attribute> name</Attribute><Symbol>=..</Symbol><Mustache Partial>/name </Mustache Partial><Mustache Variable>}}</Mustache Variable><br/> | ||||
99 | <Normal Text> </Normal Text><Mustache Block>{{#> myPartial</Mustache Block><Mustache Inside> </Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
100 | <Normal Text> Failover content</Normal Text><br/> | ||||
101 | <Normal Text> </Normal Text><Mustache Block>{{/myPartial}}</Mustache Block><br/> | ||||
102 | <Normal Text> </Normal Text><Mustache Block>{{#*inline</Mustache Block><Mustache Inside> </Mustache Inside><String>"myPartial"</String><Mustache Block>}}</Mustache Block><br/> | ||||
103 | <Normal Text> My Content</Normal Text><br/> | ||||
104 | <Normal Text> </Normal Text><Mustache Block>{{/inline}}</Mustache Block><br/> | ||||
105 | <Normal Text> </Normal Text><Mustache Block>{{#each</Mustache Block><Mustache Inside> children</Mustache Inside><Mustache Block>}}</Mustache Block><br/> | ||||
106 | <Normal Text> </Normal Text><Mustache Variable>{{></Mustache Variable><Mustache Partial> myPartial</Mustache Partial><Mustache Variable>}}</Mustache Variable><br/> | ||||
107 | <Normal Text> </Normal Text><Mustache Block>{{/each}}</Mustache Block><br/> | ||||
108 | <Normal Text></Normal Text><br/> | ||||
109 | <Normal Text> </Normal Text><Element Tag></body></Element Tag><br/> | ||||
110 | <Element Tag></html></Element Tag><br/> |