Skip to content

Commit 44c6fc8

Browse files
authored
fix: update detection of changelog links (#573)
The Node.js `CHANGELOG.md` file was changed so that `_` characters in links are now escaped. Refs: nodejs/node#40322
1 parent 3091f99 commit 44c6fc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/prepare_release.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ class ReleasePreparation {
331331
const data = await fs.readFile(mainChangelogPath, 'utf8');
332332
const arr = data.split('\n');
333333

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

0 commit comments

Comments
 (0)