@@ -40,23 +40,21 @@ async function fetchSponsorsMarkdown() {
4040// Main
4141//-----------------------------------------------------------------------------
4242
43- ( async ( ) => {
44- const allSponsors = await fetchSponsorsMarkdown ( ) ;
43+ const allSponsors = await fetchSponsorsMarkdown ( ) ;
4544
46- README_FILE_PATHS . forEach ( filePath => {
45+ README_FILE_PATHS . forEach ( filePath => {
4746
48- // read readme file
49- const readme = readFileSync ( filePath , "utf8" ) ;
47+ // read readme file
48+ const readme = readFileSync ( filePath , "utf8" ) ;
5049
51- let newReadme = readme . replace (
52- / < ! - - s p o n s o r s s t a r t - - > [ \w \W ] * ?< ! - - s p o n s o r s e n d - - > / u,
53- `<!--sponsorsstart-->\n${ allSponsors } \n<!--sponsorsend-->`
54- ) ;
50+ let newReadme = readme . replace (
51+ / < ! - - s p o n s o r s s t a r t - - > [ \w \W ] * ?< ! - - s p o n s o r s e n d - - > / u,
52+ `<!--sponsorsstart-->\n${ allSponsors } \n<!--sponsorsend-->`
53+ ) ;
5554
56- // replace multiple consecutive blank lines with just one blank line
57- newReadme = newReadme . replace ( / (?< = ^ | \n ) \n { 2 , } / gu, "\n" ) ;
55+ // replace multiple consecutive blank lines with just one blank line
56+ newReadme = newReadme . replace ( / (?< = ^ | \n ) \n { 2 , } / gu, "\n" ) ;
5857
59- // output to the files
60- writeFileSync ( filePath , newReadme , "utf8" ) ;
61- } ) ;
62- } ) ( ) ;
58+ // output to the files
59+ writeFileSync ( filePath , newReadme , "utf8" ) ;
60+ } ) ;
0 commit comments