You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id(web/markdown): strip_leading_blank_quote_lines deletes a literal blank line at the start of a top-level fenced code block on save (residual of #1002 / PR #4816) #8665
strip_leading_blank_quote_lines (pkgs/id/src/web/markdown/markdown_serialization.rs, the #1002 save-path stripper) has no fenced-code-block state. On save, it deletes a literal blank line from the start of a top-level fenced code block whose first content lines look like quote lines.
Mechanism: the fence opener line is neither a blank quote line nor quote content, so the scan sets at_quote_start = true; the next line (> , blank quote) is then treated as the start of a quote run, and the lookahead sees > text (quote content) and strips the blank — even though both lines are literal code content inside the fence.
Origin
This is the unresolved CodeRabbit Major finding on PR #4816 (discussion r4452869637, #4816 (comment)), which merged for #1002 without the finding being dispositioned. It was flagged again by task 6565's park reason; this filing is that investigation's result (task 6565, lane code-a, 2026-11-11). The neighbouring restore_github_alert_markers in the same file already tracks fences (FenceTracker in markdown_scan.rs) for exactly this reason.
Fix shape
Track fenced-block state in strip_leading_blank_quote_lines (reuse FenceTracker + split_quote_prefix, as restore_github_alert_markers does): never strip lines inside a fence, at any quote depth. Add round-trip regression tests: top-level backtick/tilde fences whose first content lines are > + > text, plus the existing #1002 controls (fence/table/rule-first quotes still strip their leading blanks).
Acceptance: the probe cases above round-trip byte-identically; the existing web::markdown tests (incl. test_blockquote_leading_block_round_trips_without_extra_blank_lines) pass.
🤖 Filed by repo-queue worker lane code-a (task 6565) — agent-note:v1 state=filed at=2026-11-11T12:37:00Z
Activity
developing-today commentedon Nov 11, 2026
CODE-2591
fix(id/web): account for list prefixes when opening a tracked fence (#…
fix(id/web): strip scan also tracks raw HTML blocks (#8665)
fix(id/web): feed active literal blocks at any indent in strip scan (#…
Merge pull request #8678 from developing-today/queue/6565-8665-fence-…