本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
jan
/
mustache.js
镜像来自
https://github.com/janl/mustache.js
關注
1
收藏
0
複製
0
程式碼
問題
0
版本發佈
46
Wiki
活動
瀏覽代碼
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
16 年之前
父節點
2f8512e091
當前提交
0bb4776def
共有
3 個檔案被更改
,包括
4 行新增
和
3 行删除
分割檢視
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
查看文件
@@ -1 +1 @@
ERROR: 'foo' not found in context
+ 2
- 1
mustache.js
查看文件
@@ -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
查看文件
@@ -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
Preview
Loading…
取消
儲存