Este site funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Acessar
jan
/
mustache.js
espelhamento de
https://github.com/janl/mustache.js
Observar
1
Favorito
0
Fork
0
Código
Issues
0
Versões
46
Wiki
Atividade
Ver código fonte
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
16 anos atrás
pai
2f8512e091
commit
0bb4776def
3 arquivos alterados
com
4 adições
e
3 exclusões
Visão dividida
Opções de diferenças
Mostrar estatísticas
Baixar arquivo de patch
Baixar arquivo de diferenças
+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 arquivo
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
Ver arquivo
@@ -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 arquivo
@@ -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|
Escrever
Pré-visualização
Carregando…
Cancelar
Salvar