| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 69b3d2c commit 97d7422
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,9 +26,13 @@ if (commitListingStart === -1) { | |||
| 26 | 26 | commitList = changelog.replace(/(^.+\n### Semver-Major|\n### Semver-(Minor|Patch)) Commits\n/gs, '') | |
| 27 | 27 | .replaceAll('**(SEMVER-MAJOR)** ', ''); | |
| 28 | 28 | } else { | |
| 29 | - const commitListingEnd = changelog.indexOf('\n\n<a', commitListingStart); | ||
| 30 | - assert.notStrictEqual(commitListingEnd, -1); | ||
| 31 | - commitList = changelog.slice(commitListingStart, commitListingEnd + 1); | ||
| 29 | + // We can't assume the Commits section is the one for this release in case of | ||
| 30 | + // a release to transition to LTS (i.e. with no commits). | ||
| 31 | + const releaseStart = /\n<a id="(\d+\.\d+\.\d+)"><\/a>\n\n## \d+-\d+-\d+, Version \1/.exec(changelog); | ||
| 32 | + assert.ok(releaseStart, 'Could not determine the start of the release section'); | ||
| 33 | + const releaseEnd = changelog.indexOf('\n\n<a', releaseStart.index); | ||
| 34 | + assert.notStrictEqual(releaseEnd, -1, 'Could not determine the end of the release section'); | ||
| 35 | + commitList = changelog.slice(commitListingStart, releaseEnd + 1); | ||
| 32 | 36 | } | |
| 33 | 37 | ||
| 34 | 38 | // Normalize for consistent comparison | |
| Back | FazBrowse Home | New Git URL |
0 commit comments