Skip to content

Commit b320a40

Browse files
committed
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 b450378 commit b320a40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/prepare_release.js

+2-1
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)