Ce site fonctionne mieux avec JavaScript.
Accueil
Explorateur
Aide
Connexion
jan
/
mustache.js
miroir de
https://github.com/janl/mustache.js
Suivre
1
Ajouter aux favoris
0
Bifurcation
0
Code
Tickets
0
Versions
46
Wiki
Activité
Parcourir la source
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
il y a 16 ans
Parent
2f8512e091
révision
0bb4776def
3 fichiers modifiés
avec
4 ajouts
et
3 suppressions
Vue séparée
Option de Diff
Voir les Statistiques
Télécharger le Fichier Patch
Télécharger le Fichier des Différences
+1
-1
examples/error_not_found.txt
+2
-1
mustache.js
+1
-1
test/mustache_spec.rb
+ 1
- 1
examples/error_not_found.txt
Voir le fichier
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
Voir le fichier
@@ -158,7 +158,8 @@ var Mustache = function() {
if(context[name] !== undefined) {
return context[name];
}
throw({message: "'" + name + "' not found in context"});
// silently ignore unkown variables
return "";
},
// Utility methods
+ 1
- 1
test/mustache_spec.rb
Voir le fichier
@@ -37,7 +37,7 @@ describe "mustache" do
print('ERROR: ' + e.message);
}
JS
run_js(js).should == "
ERROR: 'x' not found in context
\n"
run_js(js).should == "\n"
end
non_partials.each do |testname|
Écrire
Aperçu
Chargement…
Annuler
Enregistrer