Skip to content

Commit

Permalink
update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Aug 9, 2024
1 parent b82a788 commit 95b764f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/extract-latest-release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function extractLatestChangelog(changelogPath) {
const changelog = fs.readFileSync(changelogPath).toString();
// Matches everything from the first entry at h2 ('##') followed by a space and a non-prerelease semver version
// until the next entry at h2.
const firstReleaseNoteEntryExp = /^## \d+\.\d+\.\d\n.*?(?=^## )/ms;
const firstReleaseNoteEntryExp = /^## \d+\.\d+\.\d\n.*?((?=^## )|$(?![\r\n]))/ms;

return changelog.match(firstReleaseNoteEntryExp)[0];
}
Expand Down

0 comments on commit 95b764f

Please sign in to comment.