commit
This commit is contained in:
commit
ec2e35c117
343 files changed
+13615
No files matched your search
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
message: "Some <code>"
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{&message}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Some <code>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
({
|
||||
'apos': "'",
|
||||
'control': 'X'
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{apos}}{{control}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
'X
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
array_of_strings: ['hello', 'world']
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#array_of_strings}}{{.}} {{/array_of_strings}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
hello world
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
value: "\\abc"
|
||||
})
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
* {{value}}
|
||||
* {{{value}}}
|
||||
* {{&value}}
|
||||
<script>
|
||||
foo = { bar: 'abc\"xyz\"' };
|
||||
foo = { bar: 'x\'y' };
|
||||
</script>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
* \abc
|
||||
* \abc
|
||||
* \abc
|
||||
<script>
|
||||
foo = { bar: 'abc\"xyz\"' };
|
||||
foo = { bar: 'x\'y' };
|
||||
</script>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
tag: "yo"
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{tag}} foo
|
||||
+1
@@ -0,0 +1 @@
|
||||
yo foo
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
({
|
||||
"foo": "foooooooooooooo",
|
||||
"bar": "<b>bar!</b>"
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{=<% %>=}}<% foo %> {{foo}} <%{bar}%> {{{bar}}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
foooooooooooooo {{foo}} <b>bar!</b> {{{bar}}}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
({
|
||||
number: function(text, render) {
|
||||
return function(text, render) {
|
||||
return +render(text);
|
||||
}
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
<p>{{#number}}0{{/number}}</p>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<p>0</p>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
({
|
||||
title: function () {
|
||||
return "A Comedy of Errors";
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h1>{{title}}{{! just something interesting... or not... }}</h1>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h1>A Comedy of Errors</h1>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
({
|
||||
header: function () {
|
||||
return "Colors";
|
||||
},
|
||||
item: [
|
||||
{name: "red", current: true, url: "#Red"},
|
||||
{name: "green", current: false, url: "#Green"},
|
||||
{name: "blue", current: false, url: "#Blue"}
|
||||
],
|
||||
link: function () {
|
||||
return this["current"] !== true;
|
||||
},
|
||||
list: function () {
|
||||
return this.item.length !== 0;
|
||||
},
|
||||
empty: function () {
|
||||
return this.item.length === 0;
|
||||
}
|
||||
})
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<h1>{{header}}</h1>
|
||||
{{#list}}
|
||||
<ul>
|
||||
{{#item}}
|
||||
{{#current}}
|
||||
<li><strong>{{name}}</strong></li>
|
||||
{{/current}}
|
||||
{{#link}}
|
||||
<li><a href="{{url}}">{{name}}</a></li>
|
||||
{{/link}}
|
||||
{{/item}}
|
||||
</ul>
|
||||
{{/list}}
|
||||
{{#empty}}
|
||||
<p>The list is empty.</p>
|
||||
{{/empty}}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<h1>Colors</h1>
|
||||
<ul>
|
||||
<li><strong>red</strong></li>
|
||||
<li><a href="#Green">green</a></li>
|
||||
<li><a href="#Blue">blue</a></li>
|
||||
</ul>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
({
|
||||
"outer": {
|
||||
"id": 1,
|
||||
"second": {
|
||||
"nothing": 2
|
||||
}
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#outer}}{{#second}}{{id}}{{/second}}{{/outer}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
1
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
({
|
||||
first: "It worked the first time.",
|
||||
second: "And it worked the second time.",
|
||||
third: "Then, surprisingly, it worked the third time.",
|
||||
fourth: "Fourth time also fine!."
|
||||
})
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{{=<% %>=}}*
|
||||
<% first %>
|
||||
* <% second %>
|
||||
<%=| |=%>
|
||||
* | third |
|
||||
|={{ }}=|
|
||||
* {{ fourth }}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
*
|
||||
It worked the first time.
|
||||
* And it worked the second time.
|
||||
* Then, surprisingly, it worked the third time.
|
||||
* Fourth time also fine!.
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
({
|
||||
bedrooms: true,
|
||||
total: 1
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#bedrooms}}{{total}}{{/bedrooms}} BED
|
||||
+1
@@ -0,0 +1 @@
|
||||
1 BED
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
({
|
||||
name: "A Book",
|
||||
authors: ["John Power", "Jamie Walsh"],
|
||||
price: {
|
||||
value: 200,
|
||||
vat: function () {
|
||||
return this.value * 0.2;
|
||||
},
|
||||
currency: {
|
||||
symbol: '$',
|
||||
name: 'USD'
|
||||
}
|
||||
},
|
||||
availability: {
|
||||
status: true,
|
||||
text: "In Stock"
|
||||
},
|
||||
// And now, some truthy false values
|
||||
truthy: {
|
||||
zero: 0,
|
||||
notTrue: false
|
||||
}
|
||||
})
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<!-- exciting part -->
|
||||
<h1>{{name}}</h1>
|
||||
<p>Authors: <ul>{{#authors}}<li>{{.}}</li>{{/authors}}</ul></p>
|
||||
<p>Price: {{{price.currency.symbol}}}{{price.value}} {{#price.currency}}{{name}} <b>{{availability.text}}</b>{{/price.currency}}</p>
|
||||
<p>VAT: {{{price.currency.symbol}}}{{#price}}{{vat}}{{/price}}</p>
|
||||
<!-- boring part -->
|
||||
<h2>Test truthy false values:</h2>
|
||||
<p>Zero: {{truthy.zero}}</p>
|
||||
<p>False: {{truthy.notTrue}}</p>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<!-- exciting part -->
|
||||
<h1>A Book</h1>
|
||||
<p>Authors: <ul><li>John Power</li><li>Jamie Walsh</li></ul></p>
|
||||
<p>Price: $200 USD <b>In Stock</b></p>
|
||||
<p>VAT: $40</p>
|
||||
<!-- boring part -->
|
||||
<h2>Test truthy false values:</h2>
|
||||
<p>Zero: 0</p>
|
||||
<p>False: false</p>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
({
|
||||
foo: true,
|
||||
bar: "{{win}}",
|
||||
win: "FAIL"
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#foo}}{{bar}}{{/foo}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{win}}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
jobs: []
|
||||
})
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
These are the jobs:
|
||||
{{#jobs}}
|
||||
{{.}}
|
||||
{{/jobs}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
These are the jobs:
|
||||
+1
@@ -0,0 +1 @@
|
||||
({})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#foo}}{{/foo}}foo{{#bar}}{{/bar}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
({
|
||||
description: "That is all!",
|
||||
child: {
|
||||
description: ""
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{description}}{{#child}}{{description}}{{/child}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
That is all!
|
||||
+1
@@ -0,0 +1 @@
|
||||
({})
|
||||
+1
@@ -0,0 +1 @@
|
||||
<html><head></head><body><h1>Test</h1></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<html><head></head><body><h1>Test</h1></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
bar: 2
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{foo}}
|
||||
Whitespace-only changes.
+6
@@ -0,0 +1,6 @@
|
||||
({
|
||||
title: function () {
|
||||
return "Bear > Shark";
|
||||
},
|
||||
entities: "" \"'<>/"
|
||||
})
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<h1>{{title}}</h1>
|
||||
And even {{entities}}, but not {{{entities}}}.
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<h1>Bear > Shark</h1>
|
||||
And even &quot; "'<>/, but not " "'<>/.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
({
|
||||
"emptyString": "",
|
||||
"emptyArray": [],
|
||||
"zero": 0,
|
||||
"null": null,
|
||||
"undefined": undefined,
|
||||
"NaN": 0/0
|
||||
})
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{{#emptyString}}empty string{{/emptyString}}
|
||||
{{^emptyString}}inverted empty string{{/emptyString}}
|
||||
{{#emptyArray}}empty array{{/emptyArray}}
|
||||
{{^emptyArray}}inverted empty array{{/emptyArray}}
|
||||
{{#zero}}zero{{/zero}}
|
||||
{{^zero}}inverted zero{{/zero}}
|
||||
{{#null}}null{{/null}}
|
||||
{{^null}}inverted null{{/null}}
|
||||
{{#undefined}}undefined{{/undefined}}
|
||||
{{^undefined}}inverted undefined{{/undefined}}
|
||||
{{#NaN}}NaN{{/NaN}}
|
||||
{{^NaN}}inverted NaN{{/NaN}}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
|
||||
inverted empty string
|
||||
|
||||
inverted empty array
|
||||
|
||||
inverted zero
|
||||
|
||||
inverted null
|
||||
|
||||
inverted undefined
|
||||
|
||||
inverted NaN
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
({
|
||||
grand_parent_id: 'grand_parent1',
|
||||
parent_contexts: [
|
||||
{
|
||||
parent_id: 'parent1',
|
||||
child_contexts: [
|
||||
{ child_id: 'parent1-child1' },
|
||||
{ child_id: 'parent1-child2' }
|
||||
]
|
||||
},
|
||||
{
|
||||
parent_id: 'parent2',
|
||||
child_contexts: [
|
||||
{ child_id: 'parent2-child1' },
|
||||
{ child_id: 'parent2-child2' }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{{grand_parent_id}}
|
||||
{{#parent_contexts}}
|
||||
{{grand_parent_id}}
|
||||
{{parent_id}}
|
||||
{{#child_contexts}}
|
||||
{{grand_parent_id}}
|
||||
{{parent_id}}
|
||||
{{child_id}}
|
||||
{{/child_contexts}}
|
||||
{{/parent_contexts}}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
grand_parent1
|
||||
grand_parent1
|
||||
parent1
|
||||
grand_parent1
|
||||
parent1
|
||||
parent1-child1
|
||||
grand_parent1
|
||||
parent1
|
||||
parent1-child2
|
||||
grand_parent1
|
||||
parent2
|
||||
grand_parent1
|
||||
parent2
|
||||
parent2-child1
|
||||
grand_parent1
|
||||
parent2
|
||||
parent2-child2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
({
|
||||
name: "Tater",
|
||||
helper: "To tinker?",
|
||||
bolder: function () {
|
||||
return function (text, render) {
|
||||
return text + ' => <b>' + render(text) + '</b> ' + this.helper;
|
||||
}
|
||||
}
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#bolder}}Hi {{name}}.{{/bolder}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Hi {{name}}. => <b>Hi Tater.</b> To tinker?
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
html: "I like {{mustache}}"
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
You said "{{{html}}}" today
|
||||
+1
@@ -0,0 +1 @@
|
||||
You said "I like {{mustache}}" today
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
({
|
||||
"repos": []
|
||||
})
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{{#repos}}<b>{{name}}</b>{{/repos}}
|
||||
{{^repos}}No repos :({{/repos}}
|
||||
{{^nothin}}Hello!{{/nothin}}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
|
||||
No repos :(
|
||||
Hello!
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
({
|
||||
"person?": {
|
||||
name: "Jon"
|
||||
}
|
||||
})
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{{#person?}}
|
||||
Hi {{name}}!
|
||||
{{/person?}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Hi Jon!
|
||||
+1
@@ -0,0 +1 @@
|
||||
({})
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{{"+(function () {throw "evil"})()+"}}
|
||||
{{{"+(function () {throw "evil"})()+"}}}
|
||||
{{> "+(function () {throw "evil"})()+"}}
|
||||
{{# "+(function () {throw "evil"})()+"}}
|
||||
{{/ "+(function () {throw "evil"})()+"}}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
({})
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{{!
|
||||
|
||||
This is a multi-line comment.
|
||||
|
||||
}}
|
||||
Hello world!
|
||||
+1
@@ -0,0 +1 @@
|
||||
Hello world!
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
({
|
||||
bold: function () {
|
||||
return function (text, render) {
|
||||
return '<b>' + render(text) + '</b>';
|
||||
};
|
||||
},
|
||||
person: { name: 'Jonas' }
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#bold}}{{#person}}My name is {{name}}!{{/person}}{{/bold}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<b>My name is Jonas!</b>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
({
|
||||
inner: [{
|
||||
foo: 'foo',
|
||||
inner: [{
|
||||
bar: 'bar'
|
||||
}]
|
||||
}]
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#inner}}{{foo}}{{#inner}}{{bar}}{{/inner}}{{/inner}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
foobar
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
({
|
||||
foo: [
|
||||
{a: {b: 1}},
|
||||
{a: {b: 2}},
|
||||
{a: {b: 3}}
|
||||
]
|
||||
})
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{{#foo}}
|
||||
{{#a}}
|
||||
{{b}}
|
||||
{{/a}}
|
||||
{{/foo}}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
({
|
||||
items: [
|
||||
{
|
||||
name: 'name',
|
||||
items: [1, 2, 3, 4]
|
||||
}
|
||||
]
|
||||
})
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{#items}}{{name}}{{#items}}{{.}}{{/items}}{{/items}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
name1234
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
({
|
||||
name: "Elise",
|
||||
glytch: true,
|
||||
binary: false,
|
||||
value: null,
|
||||
undef: undefined,
|
||||
numeric: function() {
|
||||
return NaN;
|
||||
}
|
||||
})
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
Hello {{name}}
|
||||
glytch {{glytch}}
|
||||
binary {{binary}}
|
||||
value {{value}}
|
||||
undef {{undef}}
|
||||
numeric {{numeric}}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
Hello Elise
|
||||
glytch true
|
||||
binary false
|
||||
value
|
||||
undef
|
||||
numeric NaN
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
({
|
||||
name: 'Joe',
|
||||
friends: null
|
||||
})
|
||||
Loaded 100 of 343 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user