Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix update-readme to avoid multiple consecutive blank lines #15375

Merged
merged 1 commit into from Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -230,7 +230,6 @@ Milos Djermanovic
</a>
</td></tr></tbody></table>


### Reviewers

The people who review and implement new features.
Expand All @@ -247,9 +246,6 @@ Toru Nagashima
</a>
</td></tr></tbody></table>




### Committers

The people who review and fix bugs and help triage issues.
Expand Down Expand Up @@ -286,7 +282,6 @@ Nitin Kumar
</a>
</td></tr></tbody></table>


<!--teamend-->

## <a name="sponsors"></a>Sponsors
Expand Down
3 changes: 3 additions & 0 deletions tools/update-readme.js
Expand Up @@ -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");