clean up conditionals only at the very end of parsing

v1.18.x
psychobunny 11 years ago
parent 26848641cd
commit 503e59b12b

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

Loading…
Cancel
Save