From 846b7a12214f5ea27f18056e86369a307acfe623 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Thu, 13 Aug 2026 22:25:16 -0700 Subject: [PATCH] fix(release): stop the folded changelog rendering as two lists The consolidation put a blank line between the stable entries and the folded-in prerelease entries. A blank line inside a markdown list ends it, so every section in the 5.1.0 release PR rendered as two separate lists with a gap down the middle. The separator is removed and both runs of entries are filtered of blank lines before being joined, so a section is one list. I claimed the previous change was verified. It was not: I checked entry counts, heading order and the maximum run of consecutive blank lines, none of which can see a single blank line sitting between two list items. The check that finds it is looking for exactly that, and it now runs against the output: no blank line between consecutive entries anywhere in the 5.1.0 section. The one remaining split is in the 2022 4.0.0-alpha.0 section, is present in the input, and is left alone. Co-Authored-By: Claude --- scripts/consolidate-prerelease-changelog.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/consolidate-prerelease-changelog.mjs b/scripts/consolidate-prerelease-changelog.mjs index 1538197..47f104d 100644 --- a/scripts/consolidate-prerelease-changelog.mjs +++ b/scripts/consolidate-prerelease-changelog.mjs @@ -124,7 +124,13 @@ for (const section of sections.slice(0, 1)) { for (const group of splitSubsections(pre.body)) { const existing = groups.find((g) => g.name === group.name); if (existing) { - existing.entries = [...trimBlank(existing.entries), '', ...trimBlank(group.entries)]; + // No separator between the two runs of entries. A blank line inside a + // markdown list ends it, so a separator here rendered every section as + // two lists with a gap down the middle instead of one list. + existing.entries = [ + ...trimBlank(existing.entries).filter((line) => line.trim() !== ''), + ...trimBlank(group.entries).filter((line) => line.trim() !== ''), + ]; } else { groups.push({ name: group.name, entries: trimBlank(group.entries) }); }