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
paxaxel223 committed Oct 25, 2021
1 parent 99b20e2 commit 81a7ad4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/prepare_release.js
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 81a7ad4

Please sign in to comment.