Explorar el Código

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

tags/0.3.0
Jason Smith hace 16 años
padre
commit
d82a1174d7
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. +1
    -1
      examples/comments.txt
  2. +1
    -1
      mustache.js

+ 1
- 1
examples/comments.txt Ver fichero

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

+ 1
- 1
mustache.js Ver fichero

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


Cargando…
Cancelar
Guardar