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): saving a blockquote that starts with a code block, table or rule inserts two stray blank lines at the top of the quote · Issue #1002 · developing-today/code

id(web): saving a blockquote that starts with a code block, table or rule inserts two stray blank lines at the top of the quote #1002

New issue
Copy link
New issue
Copy link
Closed
#4816
Closed
id(web): saving a blockquote that starts with a code block, table or rule inserts two stray blank lines at the top of the quote#1002
#4816
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)mode/onlineFully doable remotely: design, config, code, cloudpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 26, 2026
Issue body actions

Bug

In the id web editor's markdown ↔ ProseMirror codec (pkgs/id/src/web/markdown.rs), saving a document whose blockquote starts with a non-paragraph block (a fenced code block, a table, or a thematic break) inserts two stray blank lines — > lines — at the top of the quote, before that first block:

Input:

> ```rust
> let x = 1;
> ```

After one load/save round trip:

> 
> 
> ```rust
> let x = 1;
> ```

The ProseMirror document is correct throughout (the blockquote contains exactly one code_block, no empty paragraphs) and the output is a stable fixpoint — the two lines appear on the first save and stay. But every affected file gets polluted on save, the quote renders with a gap at the top in other renderers, and the diff noise obscures real edits.

Verified repro (this run, main 3b9d159)

Standalone verbatim-codec probe crate (evidence log: goal hidden_files/probe-2026-10-26-1415/out3.log, probe source is current markdown.rs verbatim):

  • markdown_to_prosemirror("> ```rust\n> let x = 1;\n> ```\n") → {"type":"blockquote","content":[{"type":"code_block","attrs":{"params":"rust"}, …}]} — correct, no empty paragraphs.
  • prosemirror_to_markdown of that document → "> \n> \n> ```rust\n> let x = 1;\n> ```\n" — two leading blank quote lines.
  • Same pattern for a table as first block (> | a |… → two leading > lines) and a thematic break first (> ---\n> text → two leading > lines, plus the normal separator before text).
  • Controls that save cleanly: blockquote starting with a paragraph, a heading, or a list; a blockquote where the same code block is not first (> intro + fence) saves with exactly the one normal separator line.
  • Control isolating the layer: comrak's own parse → format_commonmark render of the original input produces the same two blank lines, so the quirk is in the comrak CommonMark renderer behaviour the codec's save direction relies on (prosemirror_to_markdown, markdown.rs:868-874, serializes a hand-built AST with format_commonmark) — the codec inherits it on every save even though its own AST is correct.

Not #954: that issue is no-info code blocks being rewritten as indented blocks (document-level). This one is about leading blank lines inside a blockquote, affects info-string fences, tables and thematic breaks, and also appears when the block is not first in the file but first in the quote.

Why it matters

Silent file pollution on save, in the same codec family as #982/#954/#981 but a distinct mechanism: quoted code snippets, quoted tables and quoted rules are common in notes/docs, and the first save of any such file rewrites its top-of-quote for no reason.

Suggested fix

In the save direction, stop the two spurious separator lines from reaching the file — e.g. investigate whether the hand-built AST is missing something the renderer keys on for a blockquote's first child (in which case fix json_to_ast's blockquote/code_block construction), or post-process the serialized output to collapse a blockquote's leading blank > lines (only at quote start — blank separators between blocks in a quote are required and must be kept, cf. the > intro + fence control). If the behaviour turns out to be unfixable without forking the renderer, record that and close with the rationale rather than leaving it untracked.

Acceptance criteria

  • Round-trip tests: blockquote starting with (a) a fenced code block with an info string, (b) a table, (c) a thematic break followed by text — each saves byte-identical to its input (no leading > lines).
  • Regression controls unchanged: blockquote starting with paragraph/heading/list, and paragraph-then-fence inside a quote (exactly one separator blank line), still round-trip as today.
  • Existing web::markdown tests pass.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    on Oct 26, 2026
  2. developing-today commented on Oct 26, 2026

    @developing-today
    developing-todayBot
    on Oct 26, 2026 – with developing.today
    Contributor
    More actions

    CODE-173

  3. dezren39
    added
    source/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 26, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 26, 2026
  5. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job
    • Session / ID: new-issue-creator cron run 2026-10-26 14:10 CDT
    • Found via: filed this run
    • Task: Verified with a standalone verbatim-codec probe on main 3b9d159 (log hidden_files/probe-2026-10-26-1415/out3.log): a blockquote whose first block is a fenced code block, table or thematic break saves with two stray leading > blank lines; the ProseMirror doc is correct and comrak's own parse→render shows the same quirk, so it is the save direction's renderer behaviour. Enqueued as a triage packet to repo-health-code-pilot.
    • Expectation: triage decides the fix layer (AST construction vs serializer post-processing); done when quote-first-block round trips are byte-identical and the between-block separator controls still pass.
    • Links: probe evidence in goal hidden_files (see issue body)
  6. dezren39
    added
    effort/sSmall: expected under 2 hours of work
    mode/onlineFully doable remotely: design, config, code, cloud
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  7. 104 remaining items

  8. dezren39
    added 2 commits that reference this issue on Nov 11, 2026

    queue/6565: failing repro test for #1002 blockquote leading blanks

    99bbc61

    queue/6565: strip renderer's leading blank quote lines on save (#1002)

    2f944d1
  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 11, 2026
  10. dezren39
    added 3 commits that reference this issue on Nov 11, 2026

    queue/6565: failing repro test for #1002 blockquote leading blanks

    76b166a

    queue/6565: strip renderer's leading blank quote lines on save (#1002)

    c6659ec

    Merge pull request #4816 from developing-today/queue/6565-1002-blockq…

    f7b9a62
  11. dezren39
    closed this as completedin #4816on Nov 11, 2026
  12. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 11, 2026
  13. developing-today
    added
    status:done
    on Nov 11, 2026
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    Task complete. PR #4816 was already merged (2026-11-11T01:46:27Z, head c6659ec); the park reason — investigate the unresolved CodeRabbit Major (discussion r4452869637) — is now closed out:

    • Finding CONFIRMED end-to-end on origin/main: a probe binary showed strip_leading_blank_quote_lines (no fence state) deleting the first line of a top-level fenced code block whose content starts with quote-like lines. Filed as 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.
    • id: lib test target does not compile — web/mod.rs mixed-listener test calls web_routers with 12 of 13 args (missing SeitanState) #8666 / PR fix(id): pass SeitanState to web_routers in mixed-listener test (#8666) #8668 (merged afe7409): fixed the id lib test target, which did not compile on main (web_routers called with 12 of 13 args, missing SeitanState).
    • 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 / PR fix(id/web): strip_leading_blank_quote_lines tracks fences (#8665) #8678 (merged 92004d6): the stripper now tracks fenced code and raw HTML blocks with the same FenceTracker/HtmlBlockTracker machinery as the alert-marker restore scan. Codex reviewed four rounds; three P2s (list-marker fence openers, fence-shaped lines in HTML comments, indented HTML terminators) were each fixed with regression tests. Laptop verification: cargo test --all-features --lib web::markdown — 286 passed, 0 failed.
    • The CodeRabbit thread on PR fix(id): no leading blank lines when blockquote starts with fence/table/rule (#1002) #4816 has been replied to with this evidence and resolved.

    — repo-worker-code-a (fleet task 6565)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)mode/onlineFully doable remotely: design, config, code, cloudpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.