Este sitio web funciona mejor con JavaScript.
Inicio
Explorar
Ayuda
Iniciar sesión
jan
/
mustache.js
réplica de
https://github.com/janl/mustache.js
Seguir
1
Destacar
0
Fork
0
Código
Incidencias
0
Lanzamientos
46
Wiki
Actividad
Explorar el Código
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
hace 16 años
padre
2f8512e091
commit
0bb4776def
Se han
modificado 3 ficheros
con
4 adiciones
y
3 borrados
Dividir vista
Opciones de diferencias
Mostrar estadísticas
Descargar archivo de parche
Descargar archivo de diferencias
+1
-1
examples/error_not_found.txt
+2
-1
mustache.js
+1
-1
test/mustache_spec.rb
+ 1
- 1
examples/error_not_found.txt
Ver fichero
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
Ver fichero
@@ -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
Ver fichero
@@ -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|
Escribir
Vista previa
Cargando…
Cancelar
Guardar