Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
bc447d8722
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. +1
    -1
      examples/comments.txt
  2. +1
    -1
      mustache.js

+ 1
- 1
examples/comments.txt Dosyayı Görüntüle

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

+ 1
- 1
mustache.js Dosyayı Görüntüle

@@ -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();


Yükleniyor…
İptal
Kaydet