Currently, Nikola has the following code for removing metadata comments from HTML output, copy-pasted in most compilers:
if not is_two_file:
data = re.split('(\n\n|\r\n\r\n)', data, maxsplit=1)[-1]
This has one issue: this requires that:
Overall, this is kinda hacky. It’d be good if there was a better way, possibly one that isn’t littered all over our codebase.
Via: #957, @simonvanderveldt. CC @ralsina, @al3xandru.