Deze website werkt beter met JavaScript.
Beginscherm
Verkennen
Help
Inloggen
jan
/
mustache.js
kopie van
https://github.com/janl/mustache.js
Volgen
1
Ster
0
Vork
0
Code
Kwesties
0
Publicaties
46
Wiki
Activiteit
Bladeren bron
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
16 jaren geleden
bovenliggende
2f8512e091
commit
0bb4776def
3 gewijzigde bestanden
met
toevoegingen van 4
en
3 verwijderingen
Zij-aan-zij weergave
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
examples/error_not_found.txt
+2
-1
mustache.js
+1
-1
test/mustache_spec.rb
+ 1
- 1
examples/error_not_found.txt
Bestand weergeven
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
Bestand weergeven
@@ -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
Bestand weergeven
@@ -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|
Schrijf
Voorbeeld
Laden…
Annuleren
Opslaan