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): a marked span starting or ending with a space loses its mark on reopen when a word character touches it — saved   form cannot reparse · Issue #1418 · developing-today/code

id(web): a marked span starting or ending with a space loses its mark on reopen when a word character touches it — saved   form cannot reparse #1418

New issue
Copy link
New issue
Copy link
Closed
#1510
Closed
id(web): a marked span starting or ending with a space loses its mark on reopen when a word character touches it — saved   form cannot reparse#1418
#1510
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/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Problem

In pkgs/id's web markdown codec, a delimiter-mark span (em, strong, strikethrough) whose text starts or ends with a space loses its mark on the next open whenever a word character touches the span on that same side. The save emits the   entity form inside the delimiters (e.g. a* b*), and that form cannot reparse as emphasis: the delimiter run is followed by & (punctuation, the entity start) and preceded by a word character, so it fails CommonMark's flanking rules for opening emphasis. On reopen the mark is gone and the delimiters remain as literal text — a* b* — and a second save escapes them (a\* b\*). The codec's own output is not readable by its own parser for these shapes.

Verified on main 37418e56 with a verbatim-codec probe crate (comrak 0.56.0, compiled and run on the laptop; hidden_files/probe-2026-10-27-0927-laneA-out4.log). PM documents below are editor shapes (a user selects a space-leading word mid-sentence and italicizes it):

PM paragraph Saved After reopen
a + em( b) a* b* plain text a* b* — mark destroyed, literal *s remain
a + strong( b) a** b** plain text a** b**
a + strikethrough( b) a~~ b~~ plain text (same failure)
a + em(b ) + c a *b *c plain text a *b *c
a + strong+em( b) (same   form) mark destroyed
heading a + em( b) # a* b* mark destroyed (same)

Controls in the same probe round-trip PM-identical and byte-fixpoint, which pins the trigger to the outside neighbor on the space-carrying side: span at paragraph start/end, neighbor is a space or punctuation, or the span is padded on both edges with spaced neighbours (a * b * c survives). An authored-markdown control confirms the mechanism at the parser level: the literal markdown a* b* parses to plain text, while a * b* (space before the delimiter) parses to em( b).

Root cause

Save direction, pkgs/id/src/web/markdown.rs: create_marked_text (:1737) builds the mark wrappers (em/strong/strikethrough arms :1762-1764) around the run's full text, keeping a leading/trailing space inside the wrapper; comrak's format_commonmark then renders that edge space as an   entity inside the delimiters. Nothing in the codec checks whether the emitted delimited form can reparse — with a word character immediately outside the delimiter, it cannot (flanking rules above), so the first save writes a file the editor itself will misread on the next open.

Why it matters

The shape is ordinary editor output: select b (with its leading space) inside a sentence and press Ctrl+I, or apply bold to the last word of a sentence including the space before it. The loss is silent, destroys the formatting, and injects literal */~~ characters into the visible text; because the result is not a fixpoint, later saves compound it with backslash escapes. Siblings #1407/#1412 also leak   entities but have different root causes (marks around an image node; marks spanning html_inline nodes) — this one is a single flat span with no other nodes involved.

Acceptance criteria

  • The full matrix round-trips PM-identical and byte-fixpoint: em, strong, strikethrough (and em+strong combined) × leading-edge space and trailing-edge space × word-character neighbour on that side, in paragraphs and headings.
  • The fix preserves the rendered document (e.g. hoisting the edge space out of the mark wrapper — the space becomes unmarked, which renders identically — or another representation that reparses to the same PM doc); it must not regress the currently-working cases (span padded on both edges, space/punctuation/boundary neighbours) or the id(web): inline code combined with another mark drops the other mark on save — code+link loses the link #953/id(web): nested marks corrupt on save — em/strike/code inside strong/em gain   entities and multiplied delimiters, several non-fixpoint #968/id(web): marked spans crossing a soft line break corrupt or fragment on save — single-mark, non-fixpoint #981 mark tests.
  • Regression tests in pkgs/id/src/web/markdown.rs cover the matrix in both directions; existing web::markdown tests pass.

Related: #1407, #1412 (different   mechanisms), #968 (nested-mark fragmentation, closed), #981 (softbreak-crossing spans, closed).

Activity

Next
  1. developing-today commented on Oct 27, 2026

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

    CODE-508

  2. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  3. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-10-27 09:27 CDT
    • Found via: filed this run
    • Task: Triage/fix the mark edge-space flanking loss: delimiter-mark spans whose text starts/ends with a space emit an form that cannot reparse when a word character touches the span on that side, so the mark is destroyed on reopen and literal delimiters remain in the text.
    • Expectation: effort/s; done = the em/strong/strikethrough × leading/trailing-edge × word-neighbour matrix round-trips PM-identical and byte-fixpoint (paragraphs + headings) with regression tests, no regression to the padded/boundary cases or the id(web): inline code combined with another mark drops the other mark on save — code+link loses the link #953/id(web): nested marks corrupt on save — em/strike/code inside strong/em gain   entities and multiplied delimiters, several non-fixpoint #968/id(web): marked spans crossing a soft line break corrupt or fragment on save — single-mark, non-fixpoint #981 tests.
    • Links: evidence probe (laptop, verbatim codec on main 37418e5): hidden_files/probe-2026-10-27-0927-laneA-out4.log; body: hidden_files/issue-code-id-mark-edge-space-flanking-body.md
  5. 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 27, 2026
  6. 65 remaining items

  7. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 28, 2026
  8. dezren39
    added a commit that references this issue on Oct 28, 2026

    fix(id): normalize unmarked text-run edge whitespace at save (#1420) (#…

    7b09ac0
  9. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 28, 2026
  10. dezren39
    added a commit that references this issue on Oct 28, 2026

    fix(id): hoist delimiter-mark edge spaces touched by word chars on sa…

    dd9eb97
  11. dezren39
    closed this as completedin #1510on Oct 28, 2026
  12. developing-today
    added
    status:done
    on Oct 28, 2026
  13. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane B shift
    • Session / ID: queue task 1485
    • Found via: queue claim (resume from park)
    • Task: Done — PR fix(id): hoist delimiter-mark edge spaces touched by word chars on save (#1418) #1510 merged. Final CI at d99b6dd: 31 SUCCESS + 1 NEUTRAL (CodeRabbit), 0 failures (attempt-2 cargo-fmt-check SUCCESS; the aggregate nix flake check job completed SUCCESS after the runner backlog cleared). Merge commit dd9eb97.
    • Expectation: done = PR merged / task completed ✔
    • Links: PR fix(id): hoist delimiter-mark edge spaces touched by word chars on save (#1418) #1510
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 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/creatorFiled by the new-issue-creator 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.