diff --git a/scripts/generateDocs.ts b/scripts/generateDocs.ts index b92d519fd..a66cf8e3d 100644 --- a/scripts/generateDocs.ts +++ b/scripts/generateDocs.ts @@ -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) } /**