mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
clean up conditionals only at the very end of parsing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user