clean up conditionals only at the very end of parsing

This commit is contained in:
psychobunny
2014-01-24 13:25:27 -05:00
parent 26848641cd
commit 503e59b12b

View File

@@ -394,11 +394,11 @@
var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g');
template = template.replace(regex, '');
namespace = '';
} else {
// clean up all undefined conditionals
template = template.replace(/<!-- IF([^@]*?)ENDIF([^@]*?)-->/gi, '');
}
// clean up all undefined conditionals
template = template.replace(/<!-- IF([^@]*?)ENDIF([^@]*?)-->/gi, '');
return template;
})(data, "", template);