From 44c6fc878178af17def7b0e047fc5b155796f927 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 25 Oct 2021 10:31:04 +0100 Subject: [PATCH] fix: update detection of changelog links (#573) The Node.js `CHANGELOG.md` file was changed so that `_` characters in links are now escaped. Refs: https://github.com/nodejs/node/pull/40322 --- lib/prepare_release.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/prepare_release.js b/lib/prepare_release.js index cc95c4e9..e00b94ee 100644 --- a/lib/prepare_release.js +++ b/lib/prepare_release.js @@ -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 = `${newVersion}`; const lastRefLink = `${lastRef}`;