fix(release): keep credit examples inside Markdown fences (#12239)

* fix(release): keep credit examples inside Markdown fences

* fix(release): share fenced Markdown boundaries

* fix(release): parse nested Markdown fences and headings

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
ShuaixinHuangandmorluto authored and GitHub committed 2026-11-19 14:46:31 +00:00
1 parent 1b172f1e02
commit ff1d06ecb0
10 files changed
+302 -59

No files matched your search

+5 -3
View File
@@ -9,7 +9,6 @@ import {
contributionSummary,
readReleaseHistory,
releaseInventorySchema,
selectedReleaseNotes,
verifyInventoryHistory,
verifyReleaseNotes,
} from "./lib/release-notes.mjs";
@@ -119,7 +118,11 @@ async function main() {
const body = values["pr-body"]
? await readFile(values["pr-body"], "utf8")
: undefined;
const report = verifyReleaseNotes(inventory, notes, body);
const { notes: rendered, report } = verifyReleaseNotes(
inventory,
notes,
body,
);
if (command === "check") {
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
return;
@@ -128,7 +131,6 @@ async function main() {
throw new Error(
"render requires --output (an existing file is never overwritten)",
);
const rendered = selectedReleaseNotes(notes, inventory.version);
await writeFile(values.output, `${rendered}\n`, { flag: "wx" });
}