Skip to content

Commit

Permalink
fix: update detection of changelog links (#573)
Browse files Browse the repository at this point in the history
The Node.js `CHANGELOG.md` file was changed so that `_` characters in
links are now escaped.

Refs: nodejs/node#40322
  • Loading branch information
logictitans committed Oct 25, 2021
1 parent 5ccee95 commit 928e2ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/prepare_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ class ReleasePreparation {
const data = await fs.readFile(mainChangelogPath, 'utf8');
const arr = data.split('\n');

const hrefLink = `doc/changelogs/CHANGELOG_V${versionComponents.major}.md`;
const major = versionComponents.major;
const hrefLink = `doc/changelogs/CHANGELOG\\_V${major}.md`;
const newRefLink = `<a href="${hrefLink}#${newVersion}">${newVersion}</a>`;
const lastRefLink = `<a href="${hrefLink}#${lastRef}">${lastRef}</a>`;

Expand Down

0 comments on commit 928e2ca

Please sign in to comment.