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