Пожалуйста, включите JavaScript.
Главная
Обзор
Помощь
Вход
jan
/
mustache.js
зеркало из
https://github.com/janl/mustache.js
Следить
1
В избранное
0
Форкнуть
0
Код
Задачи
0
Релизы
46
Вики
Активность
Просмотр исходного кода
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 лет назад
Родитель
bdfb5d069e
7e83df9b05
Сommit
9017163785
5 измененных файлов
:
32 добавлений
и
30 удалений
Разделённый вид
Опции Diff
Показать статистику
Скачать Patch файл
Скачать Diff файл
+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
Просмотреть файл
@@ -2,5 +2,6 @@
title: function () {
return "Bear > Shark";
},
symbol: null,
entities: "" \"'<>`=/"
})
+ 1
- 1
test/_files/escaped.mustache
Просмотреть файл
@@ -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
Просмотреть файл
@@ -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
Просмотреть файл
@@ -1,5 +1,6 @@
({
title: function () {
return "Bear > Shark";
}
},
symbol: null
})
+ 1
- 1
test/_files/unescaped.mustache
Просмотреть файл
@@ -1 +1 @@
<h1>{{{title}}}</h1>
<h1>{{{title}}}
{{{symbol}}}
</h1>
Редактирование
Предпросмотр
Загрузка…
Отмена
Сохранить