Skip to content

Commit 9ad2cfb

Browse files
cknittclaude
andauthored
Draw Breaking as a warning quote in the semantic diff comment (#8993)
Draw Breaking as a warning quote in the comment GitHub draws a [!CAUTION] alert only at the top level of a comment, and each commit sits in a <details> block, so the marker showed as text (as in #8992's comment). Breaking is now a quote led by a warning sign. Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 98f5d69 commit 9ad2cfb

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎scripts/recordMarkdown.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,11 @@ export function commitMarkdown(r, full) {
403403
...sectionGroups(r.sections.filter(s => !BELOW.has(s.name))).map(g =>
404404
section(g.section, g.parts, full),
405405
),
406+
// A quote, not a `[!CAUTION]` alert: GitHub draws alerts only at the top
407+
// level of a comment, and inside `<details>` shows the marker as text.
406408
...r.sections
407409
.filter(s => s.name === "Breaking")
408-
.map(s => `> [!CAUTION]\n> **Breaking:** ${inline(joined(s))}`),
410+
.map(s => `> ⚠️ **Breaking:** ${inline(joined(s))}`),
409411
];
410412
const reviews = r.sections.filter(s => s.name === "Review");
411413
if (reviews.length)

‎scripts/recordMarkdown.test.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ ${SIGNED}
8484
md,
8585
'`parse`\n\n```diff\n expression\n- Pexp_extension "raw"\n+ Pexp_raw "raw"\n```',
8686
);
87-
has(md, "> [!CAUTION]\n> **Breaking:** PPXs must match Pexp\\_raw.");
87+
has(md, "> ⚠️ **Breaking:** PPXs must match Pexp\\_raw.");
88+
assert.ok(!md.includes("[!"));
8889
has(md, "**Review**\n\n- Does a PPX still see it? Yes.");
8990
has(md, "Yes.\n\n</details>");
9091
assert.ok(!md.includes("Signed-off-by"));

0 commit comments

Comments
 (0)