GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 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) · Issue #8665 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
#8678
Closed
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
#8678
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)status:done

Description

@dezren39
dezren39
opened on Nov 11, 2026
Issue body actions

Bug

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.

Verified end-to-end on origin/main f44b820 (laptop probe binary calling markdown_to_prosemirror → prosemirror_to_markdown):

  • IN: "```\n> \n> text\n```\n" → OUT: "```\n> text\n```\n" — the code block's first line (> ) is gone.
  • IN: "```rust\n> \n> text\n```\n" → OUT: "```rust\n> text\n```\n" — same loss.
  • Controls round-trip fine: quoted fence "> ```rust\n> code\n> ```\n", "> paragraph\n".

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

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 11, 2026
  2. developing-today commented on Nov 11, 2026

    @developing-today
    developing-todayBot
    on Nov 11, 2026 – with developing.today
    Contributor
    More actions

    CODE-2591

  3. developing-today
    added
    status:in-review
    on Nov 11, 2026
  4. dezren39
    added 4 commits that reference this issue on Nov 11, 2026

    fix(id/web): account for list prefixes when opening a tracked fence (#…

    32004b1

    fix(id/web): strip scan also tracks raw HTML blocks (#8665)

    7262032

    fix(id/web): feed active literal blocks at any indent in strip scan (#…

    b5ea7ab

    Merge pull request #8678 from developing-today/queue/6565-8665-fence-…

    92004d6
  5. dezren39
    closed this as completedin #8678on Nov 11, 2026
  6. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)status:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.