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): inline markup inside image alt text is stripped on save — emphasis and code spans flattened to plain text · Issue #1417 · developing-today/code

id(web): inline markup inside image alt text is stripped on save — emphasis and code spans flattened to plain text #1417

New issue
Copy link
New issue
Copy link
Closed
#1471
Closed
id(web): inline markup inside image alt text is stripped on save — emphasis and code spans flattened to plain text#1417
#1471
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, any inline markup inside an image's alt text is silently stripped on the first open→save: emphasis, strong, code spans, and nested links in the description are flattened to their plain text. The saved file no longer matches what the author wrote, and for code spans the flattening changes the literal alt text other renderers display.

Verified on main 37418e56 with a verbatim-codec probe crate (comrak 0.56.0; hidden_files/probe-2026-10-27-0854-laneA/out.log + out3.log):

Input Saved
![*alt* text](/x.png) ![alt text](/x.png)
![**bold alt**](/x.png) ![bold alt](/x.png)
![a `code` b](/x.png) ![a code b](/x.png)
![a [link](/y) b](/x.png) ![a link b](/x.png)

Controls in the same probe: a direct comrak parse→format_commonmark round-trip with the codec's own options preserves every one of these byte-for-byte (![*alt* text](/x.png), ![a `code` b](/x.png)), so this is a codec loss, not a comrak renderer behaviour. Alt text containing an escaped bracket (![a\]b](/x.png)) and entities round-trip fine — only markup structure is lost.

Root cause

Parse direction, pkgs/id/src/web/markdown.rs:354-360 (the NodeValue::Image arm of convert_node): the alt is extracted with get_text_content(node) (:710), which concatenates only the text literals of the alt subtree. The PM image node stores alt as a plain string, so the markup is gone before the save direction (:1308, which re-emits the stored string as the image's text child) ever runs.

Why it matters

Alt text with emphasis or code spans is ordinary in imported notes and documentation (e.g. ![the `resize` handler](/img.png)). The loss is silent, happens on an untouched open→save, and is a stable fixpoint afterwards, so nothing downstream notices. It is the inside-the-image counterpart of #1407 (marks around an image); the two share the image node but have different root causes and fixes.

Acceptance criteria

  • ![*alt* text](/x.png), ![**bold alt**](/x.png), and ![a `code` b](/x.png) round-trip with the alt markup preserved (exact markdown, or a form that re-parses to the same alt structure and renders the same alt text).
  • The chosen representation is coherent with how the editor treats alt as a plain string attribute today (pkgs/id/web/src/editor.ts image node): either the codec stores a markdown-form alt and re-parses it on save, or another representation is picked and any editor-side limitation is documented in the resolution.
  • Nested-link alt (![a [link](/y) b](/x.png)) is either preserved or explicitly decided and documented (it is invalid in some renderers — a documented flattening for this one case is acceptable if the emphasis/code cases above are fixed).
  • Regression tests in pkgs/id/src/web/markdown.rs cover emphasis, strong, and code-span alt text in both directions; existing web::markdown tests pass.

Related: #1407 (marks wrapping an image — different root cause), #880 (linked images), #1045 (unknown-mark policy).

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-507

  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 job (lane A, new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a cron run, 2026-10-27 08:54 CDT
    • Found via: filed this run
    • Task: Triage/fix image alt-text markup loss in the web markdown codec (parse Image arm flattens the alt subtree via get_text_content, markdown.rs:354-360/:710)
    • Expectation: effort/s — codec representation decision (markdown-form alt vs alternative) plus regression tests both directions; done when the acceptance criteria on the issue pass
    • Links: probe evidence hidden_files/probe-2026-10-27-0854-laneA/out.log + out3.log (goal workspace); related id(web): emphasis/strong/strikethrough wrapping an image are silently dropped on save — mixed text+image spans split and leak   entities #1407 (marks around an image — different root cause)
  5. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D
    • Session / ID: queue task 1414
    • Found via: queue claim
    • Task: Triage issue id(web): inline markup inside image alt text is stripped on save — emphasis and code spans flattened to plain text #1417 — verify image alt-text markup stripping in pkgs/id web markdown codec against fresh main, confirm root cause/representation, and route to a fix.
    • Expectation: effort/s — done when root cause is verified against current code and a routed outcome (fix task or documented decision) exists.
    • Links: queue task 1414
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 27, 2026
  7. 39 remaining items

  8. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 27, 2026
  9. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1414 (second park)
    • Found via: queue claim (resume)
    • Task: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 full flake suite is now reporting but all 26 checks stayed queued/pending through a 5-min poll (fleet runner backlog), 4 pass, 0 failed at 2026-10-27T19:31Z.
    • Expectation: parked 20 min; on resume merge PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 if green, then complete.
    • Links: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471
  10. 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
  11. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: queue task 1414
    • Found via: queue claim (resume of parked task)
    • Task: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 CI was pending at park time; re-checking CI fresh and merging if green.
    • Expectation: done = PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 merged (all checks green at pickup) and task 1414 completed.
    • Links: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 · branch queue/1414-1417-alt-markup
  12. dezren39
    closed this as completedin #1471on Oct 28, 2026
  13. dezren39
    added a commit that references this issue on Oct 28, 2026

    Merge pull request #1471 from developing-today/queue/1414-1417-alt-ma…

    3b55904
  14. developing-today
    added
    status:done
    on Oct 28, 2026
  15. 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 D shift
    • Session / ID: queue task 1414
    • Found via: queue claim (resume of parked task)
    • Task: Merged PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 after CI completed green.
    • Outcome: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471 merged (merge commit 3b55904). All 32 checks SUCCESS (test-unit, test shards, web unit/typecheck, clippy, fmt). Alt text is stored in markdown form and re-parsed on save; emphasis/strong/code-span/nested-link alt round-trips; plain alts byte-identical. Issue auto-closed by the PR.
    • Links: PR fix(id-web): preserve inline markup in image alt text (#1417) #1471
  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  17. dezren39
    added a commit that references this issue on Nov 2, 2026

    chore(flake): bump opencode_2 to 401ba065 (opencode: bench ladder #1305…

    cf7c6f9
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.