diff --git a/tools/update-readme.js b/tools/update-readme.js index 15b132f..48f1dcb 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -41,22 +41,20 @@ async function fetchSponsorsMarkdown() { // Main //----------------------------------------------------------------------------- -(async () => { - const allSponsors = await fetchSponsorsMarkdown(); +const allSponsors = await fetchSponsorsMarkdown(); - README_FILE_PATHS.forEach(filePath => { - // read readme file - const readme = readFileSync(filePath, "utf8"); +README_FILE_PATHS.forEach(filePath => { + // read readme file + const readme = readFileSync(filePath, "utf8"); - let newReadme = readme.replace( - /[\w\W]*?/u, - `\n\n${allSponsors}\n`, - ); + let newReadme = readme.replace( + /[\w\W]*?/u, + `\n\n${allSponsors}\n`, + ); - // replace multiple consecutive blank lines with just one blank line - newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n"); + // replace multiple consecutive blank lines with just one blank line + newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n"); - // output to the files - writeFileSync(filePath, newReadme, "utf8"); - }); -})(); + // output to the files + writeFileSync(filePath, newReadme, "utf8"); +});