Strona działa najlepiej z włączonym JavaScript.
Strona główna
Odkrywaj
Pomoc
Zaloguj się
jan
/
mustache.js
kopia lustrzana
https://github.com/janl/mustache.js
Obserwuj
1
Polub
0
Forkuj
0
Kod
Zgłoszenia
0
Wydania
46
Wiki
Aktywność
Przeglądaj źródła
Merge pull request
#553
from janl/escaped-lookup-test
Assert null lookup when rendering an unescaped value
tags/v2.3.0
David da Silva
10 lat temu
rodzic
bdfb5d069e
7e83df9b05
commit
9017163785
5 zmienionych plików
z
32 dodań
i
30 usunięć
Widok podzielony
Opcje porównania
Pokaż statystyki
Ściągnij plik aktualizacji
Ściągnij plik porównania
+1
-0
test/_files/escaped.js
+1
-1
test/_files/escaped.mustache
+27
-27
test/_files/null_lookup_object.js
+2
-1
test/_files/unescaped.js
+1
-1
test/_files/unescaped.mustache
+ 1
- 0
test/_files/escaped.js
Wyświetl plik
@@ -2,5 +2,6 @@
title: function () {
return "Bear > Shark";
},
symbol: null,
entities: "" \"'<>`=/"
})
+ 1
- 1
test/_files/escaped.mustache
Wyświetl plik
@@ -1,2 +1,2 @@
<h1>{{title}}</h1>
<h1>{{title}}
{{symbol}}
</h1>
And even {{entities}}, but not {{{entities}}}.
+ 27
- 27
test/_files/null_lookup_object.js
Wyświetl plik
@@ -1,31 +1,31 @@
({
"name": "David",
"twitter": "@dasilvacontin",
"fobject": [
{
"name": "Flor",
"twitter": "@florrts"
},
{
"name": "Miquel",
"twitter": null
},
{
"name": "Chris",
"twitter": undefined
}
],
"favorites": {
"color": "blue",
"president": "Bush",
"show": "Futurama"
"name": "David",
"twitter": "@dasilvacontin",
"fobject": [
{
"name": "Flor",
"twitter": "@florrts"
},
{
"name": "Miquel",
"twitter": null
},
"mascot": {
"name": "Squid",
"favorites": {
"color": "orange",
"president": undefined,
"show": null
}
{
"name": "Chris",
"twitter": undefined
}
],
"favorites": {
"color": "blue",
"president": "Bush",
"show": "Futurama"
},
"mascot": {
"name": "Squid",
"favorites": {
"color": "orange",
"president": undefined,
"show": null
}
}
})
+ 2
- 1
test/_files/unescaped.js
Wyświetl plik
@@ -1,5 +1,6 @@
({
title: function () {
return "Bear > Shark";
}
},
symbol: null
})
+ 1
- 1
test/_files/unescaped.mustache
Wyświetl plik
@@ -1 +1 @@
<h1>{{{title}}}</h1>
<h1>{{{title}}}
{{{symbol}}}
</h1>
Napisz
Podgląd
Ładowanie…
Anuluj
Zapisz