diff --git a/tools/update-readme.js b/tools/update-readme.js index 226a211e..a6df7ab6 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -40,23 +40,21 @@ async function fetchSponsorsMarkdown() { // Main //----------------------------------------------------------------------------- -(async () => { - const allSponsors = await fetchSponsorsMarkdown(); +const allSponsors = await fetchSponsorsMarkdown(); - README_FILE_PATHS.forEach(filePath => { +README_FILE_PATHS.forEach(filePath => { - // read readme file - const readme = readFileSync(filePath, "utf8"); + // read readme file + const readme = readFileSync(filePath, "utf8"); - let newReadme = readme.replace( - /[\w\W]*?/u, - `\n${allSponsors}\n` - ); + let newReadme = readme.replace( + /[\w\W]*?/u, + `\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"); +});