mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +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');
|
var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g');
|
||||||
template = template.replace(regex, '');
|
template = template.replace(regex, '');
|
||||||
namespace = '';
|
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;
|
return template;
|
||||||
|
|
||||||
})(data, "", template);
|
})(data, "", template);
|
||||||
|
|||||||
Reference in New Issue
Block a user