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): PR #1688's table code-span pipe preprocessor also rewrites fenced code blocks — table examples inside a fence gain spurious backslashes · Issue #2362 · developing-today/code

id(web): PR #1688's table code-span pipe preprocessor also rewrites fenced code blocks — table examples inside a fence gain spurious backslashes #2362

New issue
Copy link
New issue
Copy link
Closed
#3003
Closed
id(web): PR #1688's table code-span pipe preprocessor also rewrites fenced code blocks — table examples inside a fence gain spurious backslashes#2362
#3003
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)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

id(web): PR #1688's table code-span pipe preprocessor also rewrites fenced code blocks — a table example inside a fence gains spurious backslashes

Finding

PR #1688 (open, head 3895a266) fixes #1424 by preprocessing the markdown source before comrak parses it: escape_table_code_span_pipes (called from markdown_to_prosemirror, pkgs/id/src/web/markdown.rs:129 on the PR head) scans line by line, treats any line followed by a table delimiter row as a header row and every following line until a blank line as a table body row, and escapes unescaped pipes inside code spans on those lines (escape_table_code_span_pipes, markdown.rs:324-354 on the PR head).

The scanner has no fenced-code-block state. A fenced block that contains a markdown table example — exactly how docs and notes show table syntax — is therefore rewritten as if it were a live table: the header-looking line inside the fence gets its code-span pipes escaped. Comrak then renders the fence's contents verbatim, backslash included, so the code block displays `a\|b` where the author wrote `a|b`. That is silent corruption of literal code content on the parse direction, introduced by a change whose own guard test pins that lines outside tables stay untouched — a fence is the strongest form of "outside a table", and no test in the PR covers it.

Evidence

  • PR: fix(id): keep pipes inside code spans from splitting table cells #1688 (OPEN, head 3895a266633a5904a84e3ce42fa0c00510e1384b) — "fix(id): keep pipes inside code spans from splitting table cells" for id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424.
  • Call site (PR head): pkgs/id/src/web/markdown.rs:129 — let protected = escape_table_code_span_pipes(&protected); runs on the whole document inside markdown_to_prosemirror.
  • Scanner (PR head): markdown.rs:324-354 — the loop tracks only in_table (set by is_table_delimiter_row, markdown.rs:226) and header_row (next line is a delimiter row); there is no fence (```/~~~) tracking anywhere in the function, and its doc comment claims only "Lines outside tables are returned untouched".
  • Contrast with the sibling preprocessor in the same file: protect_newline_destinations is documented on current main (5a34fa70, markdown.rs:131-138) as "Fenced code blocks are skipped — a destination-shaped string inside a fence is literal text, not a link." The new preprocessor does not follow that house pattern.
  • Logic probe (faithful Python port of the PR's three functions, probe dir hidden_files/probe-pr1688-fence/): input fence
    ```markdown block containing | a|b | H2 | + delimiter row comes out with the header line rewritten to | a|b | H2 | inside the fence, while a real (unfenced) table gets the same escaping as intended. The fence case is therefore a mis-fire of the table detection, not comrak behaviour.
  • The PR's tests (5 new) cover body/header/only-content/one-column/outside-table cases; none puts a table or a delimiter row inside a fenced block. Deduped against open + closed issues: only id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 (open, the origin) matches; it is about live tables and never mentions fences.

Why it matters

Documents in this system routinely contain markdown-about-markdown: docs, specs, and notes that show table syntax inside fences. After this PR lands as written, merely opening such a document in the web editor rewrites its code samples (a spurious \ appears in every code span containing a pipe on a header-looking line, and on body-looking lines after a delimiter-looking line inside the same fence), and a subsequent save persists the corruption. The fix in the PR is otherwise sound — this is a contained gap in the new scanner, cheapest to close before merge while the PR is still open.

Acceptance criteria

  • escape_table_code_span_pipes (or its call path) skips fenced code blocks (``` and ~~~ fences): a table example inside a fence round-trips byte-identically through markdown_to_prosemirror / save.
  • A regression test pins the fence case (table with a code-span pipe inside a fenced block renders as a code block with the literal pipe, no backslash) alongside the PR's existing id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 tests.
  • All five id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 behaviours from PR fix(id): keep pipes inside code spans from splitting table cells #1688 are unchanged: live header/body code-span pipes still parse as one cell with the code mark intact, and lines outside tables remain untouched.

Agent: pr-diff-review-b
State: filed
Source PR: #1688

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
    source/pr-diff-reviewFiled by the pr-diff-review job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

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

    CODE-1200

  3. dezren39
    added
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review-b
    • Session / ID: pr-diff-review-b run 2026-10-29 10:18 CDT (filed this run)
    • State: filed — verified against PR fix(id): keep pipes inside code spans from splitting table cells #1688's head 3895a266 by code reading plus a faithful logic port: escape_table_code_span_pipes (pkgs/id/src/web/markdown.rs:324-354 on the PR head, called at :129) tracks in_table/header_row only and has no fenced-code-block state, so a table example inside a fence is rewritten (a|b → a\|b) and comrak renders the spurious backslash verbatim in the code block.
    • Finding: PR fix(id): keep pipes inside code spans from splitting table cells #1688's id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 preprocessor mis-fires inside fenced code blocks; the sibling preprocessor protect_newline_destinations in the same file explicitly skips fences. No other issue covers this; id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 is live tables only.
    • Routing: triage packet enqueued to repo-health-code-pilot this run; labels kind/bug, priority/normal, queue/queued, source/pr-diff-review, task/triage, status/needs-triage, app/id, effort/s. Source PR fix(id): keep pipes inside code spans from splitting table cells #1688 also labelled queue/queued (it is itself the work subject — cheapest fixed before merge).
    • Links: issue id(web): PR #1688's table code-span pipe preprocessor also rewrites fenced code blocks — table examples inside a fence gain spurious backslashes #2362 · source PR fix(id): keep pipes inside code spans from splitting table cells #1688 · origin issue id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424
  5. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 31, 2026
  7. 2 remaining items

  8. dezren39
    added
    queue/queuedHas a queued queue task
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Oct 31, 2026
  9. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (PR opened)

    • Agent: queue worker (repo-worker-code), lane E shift
    • Session / ID: queue task 4334
    • Found via: queue claim (fix follow-on from triage task 3520, same shift)
    • Done: implemented the pinned fix on branch queue/4334-2362-table-fence — escape_table_code_span_pipes now tracks fence state (backtick/tilde, mirroring protect_newline_destinations) and a fence resets table state so a fenced delimiter row cannot arm escaping after it. PR: fix(id/web): table code-span pipe preprocessor skips fenced code blocks (#2362) #3003
    • Verification (laptop; pkgs/id has no CI of its own): cargo test --lib --features web — new test_table_example_inside_fence_untouched + all five id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped #1424 tests pass; full web::markdown module 116/116 pass. (The web feature build needs the gitignored web/dist; copied from the primary clone for the build only, not committed.)
    • Remaining: Codex review on PR 3003 + merge — the PR shepherd flow owns that; this task completes as pr_opened.
  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
  11. dezren39
    added a commit that references this issue on Nov 1, 2026

    Merge pull request #3003 from developing-today/queue/4334-2362-table-…

    73423be
  12. dezren39
    closed this as completedin #3003on Nov 1, 2026
  13. developing-today
    added
    status:done
    on Nov 1, 2026
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)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

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.