Skip to content

id(web/markdown): #3746's code-span tracking never resets — one unmatched backtick disables newline-destination protection for the rest of the document #7557

Closed

Description

@dezren39

Finding

PR #3746 added inline code-span tracking to protect_newline_destinations so a destination-shaped string inside a closed code span is not protected. The tracking has no reset: a backtick run opens a span that only an equal-length run closes, and the state is carried across blank lines, headings, and every other block boundary to the end of the document. In CommonMark an unmatched backtick run is literal text, not a code span — so after any stray/unmatched backtick in prose (a common typo in notes), the scanner believes the rest of the document is code, and every genuine newline destination after it silently loses protection. That is the exact load/save corruption the protection exists to prevent, reintroduced for a whole class of real documents.

Evidence

Why it matters

The id web editor's notes are exactly the kind of prose that accumulates a stray backtick. From that character on, every link or reference definition whose destination contains a newline is parsed without the token protection, so its URL is handled by comrak's default path instead of the round-trip-safe one — silent link corruption on load/save for the remainder of the document, with no error anywhere.

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor
  3. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 8, 2026
  4. dezren39 commented on Nov 9, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  5. 35 remaining items

  6. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 9, 2026
  7. dezren39 commented on Nov 9, 2026

    @dezren39
    MemberAuthor

    Agent note pr_opened task 14420 lane code-p (resume of lane code-d implementation): branch queue/14420-7557-code-span-blank-line at d5f133e was already pushed; PR #8061 now OPEN created live by lane code-p (rate limit cleared), superseding outbox OB-2026-11-09-T14420D1208-PR and OB-2026-11-09-T14420D1208. Tests recorded by lane code-d: targeted 2 passed, web::markdown 267 passed. agent-note:v1 task=14420

  8. 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 9, 2026
  9. added 2 commits that reference this issue on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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