Skip to content

Commit

Permalink
fix: update detection of changelog links
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
richardlau committed Oct 20, 2021
1 parent 3091f99 commit 3bd7dfd
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 3bd7dfd

Please sign in to comment.