瀏覽代碼

Actually ignore comment tags; and correct the expected output in the test case

tags/0.3.0
Jason Smith Jan Lehnardt <jan@apache.org> 16 年之前
父節點
當前提交
bc447d8722
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      examples/comments.txt
  2. +1
    -1
      mustache.js

+ 1
- 1
examples/comments.txt 查看文件

@@ -1 +1 @@
<h1>A Comedy of Errors{{! just something interesting... or not... }}</h1>
<h1>A Comedy of Errors</h1>

+ 1
- 1
mustache.js 查看文件

@@ -157,7 +157,7 @@ var Mustache = function() {
lines[i] = lines[i].replace(regex, function(match, operator, name) {
switch(operator) {
case "!": // ignore comments
return match;
return "";
case "=": // set new delimiters, rebuild the replace regexp
that.set_delimiters(name);
regex = new_regex();


Loading…
取消
儲存