使用 JavaScript能使本网站更好的工作。
首页
探索
帮助
登录
jan
/
mustache.js
镜像自地址
https://github.com/janl/mustache.js
关注
1
点赞
0
派生
0
代码
工单
0
版本发布
46
百科
动态
浏览代码
mustache compat: Don't barf on unknown variables.
tags/0.2
Jan Lehnardt
16 年前
父节点
2f8512e091
当前提交
0bb4776def
共有
3 个文件被更改
,包括
4 次插入
和
3 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+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|
撰写
预览
正在加载...
取消
保存