Repository navigation
Description
Finding
PR #3740's save-side restore_github_alert_markers only unescapes a GitHub alert marker when it is the first content of its blockquote — its own doc comment: "Markers elsewhere remain ordinary escaped text." The tracking has a hole for one first-block shape: when a blockquote's first block is a fenced code block or an HTML block, no line on that path ever marks quote_has_content, so the quote still counts as "empty" when a later paragraph begins. A standalone escaped marker line there (\[\!NOTE\] with a hard break — authored literal text, not an alert) is then unescaped and its hard-break backslash is stripped, silently rewriting authored text on save. The parse side got this right (preserve_github_alert_marker_breaks requires the first child to be a Paragraph), and the nested-quote first-block case is handled (content lines mark ancestors) — fence/HTML-first is the unhandled sibling.
Evidence
- Source PR: Fix #1376: preserve GitHub alert blockquotes #3740 (merged, merge commit
bf26382e60c00db923a57915128d382af4e109be) — "Fix id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text #1376: preserve GitHub alert blockquotes". id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text #1376 is CLOSED; deduped: searches for the function name / fence-first case returned no covering issue. - Current main
2aca793a345a88b2f11a815fc190da4df07e0ee0,pkgs/id/src/web/markdown.rs,restore_github_alert_markersat:4254:- The fence-interior branch, the HTML-interior branch, and the fence/HTML opening-line branches all
continuewithout touchingquote_has_content— verified by reading the function top to bottom:quote_has_contentis written only in the depth-0 reset, the guard reset, and the final marker/content branch. quote_is_emptyis computed as!quote_has_content[..=depth].iter().any(...), so after a fence-first blockquote the later marker line still sees an "empty" quote and is unescaped (with the hard-break suffix stripped).
- The fence-interior branch, the HTML-interior branch, and the fence/HTML opening-line branches all
- Trace (this run, on the main code): input lines
> ```,> code,> ```,>,> \[\!NOTE\]\,> Body.— the three fence lines pass through the fence branches unmarked; the marker line then satisfiesquote_is_emptyand is rewritten to> [!NOTE], losing the authored escape and the hard break. - PR Fix #1376: preserve GitHub alert blockquotes #3740's tests pin the neighbouring cases — marker text inside a fence stays verbatim (
test_alert_marker_text_inside_code_fence_is_untouched), and a nested quote as first block does not make an alert (test_nested_first_block_does_not_make_alert) — but no test has a fence or HTML block as the quote's first block followed by a literal marker line.
Why it matters
This is the same silent-rewriting class #3740 was written to eliminate, in the one first-block configuration its tests do not cover: a document that quotes a code sample and then writes a literal [!NOTE]-looking line loses the escape (and a hard break) on the first save, so the text no longer round-trips as authored.
Acceptance criteria
- A blockquote whose first block is a fence or an HTML block counts as having content: a later standalone escaped marker line in it stays escaped, hard break intact.
- Genuine alerts (marker as the quote's first content) still restore, and the existing Fix #1376: preserve GitHub alert blockquotes #3740 fixpoint tests still pass.
- A regression test pins the fence-first (and ideally HTML-first) blockquote with a following literal marker line as a save fixpoint.
Activity
developing-today commentedon Nov 8, 2026
CODE-2275
dezren39 commentedon Nov 10, 2026
🤖 Agent note · triaged
task/small-fix· priority/low · effort/s · kind/bug (as filed)repo-health:v1:fix:developing-today/code:issue:7563→ queuerepo-health-code-pilot, task 14445 (enqueued by triage-step this run)dezren39 commentedon Nov 10, 2026
agent-note: task 14445 handed off to opencode claimant (lane row 5990) by lane code-v. Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session. Issue #7563 verified OPEN with no hard-stop labels and no needs-triage (fresh gh, lane code-v 2026-11-10). Parked 1200s for the claimant.
dezren39 commentedon Nov 11, 2026
🤖 Agent note · alert-restore fence/HTML-first hole fixed as PR #8715 — parked on review (task 14445, lane code-c)
3 remaining items
dezren39 commentedon Nov 11, 2026
🤖 Agent note · resumed by lane code-c (task 14445)
Merge pull request #8715 from developing-today/queue/14445-7563-alert…
dezren39 commentedon Nov 11, 2026
🤖 Agent note · done — PR #8715 merged (task 14445, lane code-c)