]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/tools/update-readme.js
import 8.4.0 source
[pve-eslint.git] / eslint / tools / update-readme.js
index 55efb6f2c521a0f43c488083902f2c6dadbb9193..0704ceff13720afec9574171d32f141ef4af1a82 100644 (file)
@@ -123,5 +123,8 @@ let newReadme = readme.replace(/<!--teamstart-->[\w\W]*?<!--teamend-->/u, ejs.re
 
 newReadme = newReadme.replace(/<!--sponsorsstart-->[\w\W]*?<!--sponsorsend-->/u, formatSponsors(allSponsors));
 
+// replace multiple consecutive blank lines with just one blank line
+newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n");
+
 // output to the file
 fs.writeFileSync(README_FILE_PATH, newReadme, "utf8");