Add warning for autogenerated files, add newline to generated files

This commit is contained in:
Pieter Vander Vennet 2023-02-12 22:52:52 +01:00
parent b5c1f1f11e
commit 48c6a3b0d7

View file

@ -64,7 +64,14 @@ function WriteFile(
md.replace(/\n\n\n+/g, "\n\n")
writeFileSync(filename, md)
if (!md.endsWith("\n")) {
md += "\n"
}
const warnAutomated =
"[//]: # (WARNING: this file is automatically generated. Please find the sources at the bottom and edit those sources)"
writeFileSync(filename, warnAutomated + md)
}
/**