Denna sida fungerar bättre med Javascript igång.
Startsida
Utforska
Hjälp
Logga in
jan
/
mustache.js
spegling av
https://github.com/janl/mustache.js
Bevaka
1
Stjärnmärk
0
Förgrening
0
Kod
Ärenden
0
Släpp
46
Wiki
Aktiviteter
Bläddra i källkod
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
16 år sedan
förälder
2f8512e091
incheckning
0bb4776def
3 ändrade filer
med
4 tillägg
och
3 borttagningar
Delad Vy
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
Visa fil
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
Visa fil
@@ -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
Visa fil
@@ -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|
Write
Förhandsgranska
Laddar…
Avbryt
Spara