Przeglądaj źródła

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

tags/0.3.0
Jason Smith 16 lat temu
rodzic
commit
d82a1174d7
2 zmienionych plików z 2 dodań i 2 usunięć
  1. +1
    -1
      examples/comments.txt
  2. +1
    -1
      mustache.js

+ 1
- 1
examples/comments.txt Wyświetl plik

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

+ 1
- 1
mustache.js Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz