Skip to content

id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text #1376

Closed

Description

@dezren39

Problem

GitHub alert blockquotes (> [!NOTE], > [!TIP], > [!WARNING], …) lose their alert semantics on save in the id web editor: the marker is backslash-escaped, so every CommonMark/GitHub renderer afterwards shows a plain blockquote containing the literal text [!NOTE] instead of a rendered alert.

Evidence (verified this run on main 0cbb91b1)

Probe: verbatim copy of pkgs/id/src/web/markdown.rs in a standalone crate (comrak 0.56.0), markdown_to_prosemirror → prosemirror_to_markdown. Logs: fleet bookkeeping probe-2026-10-27-creator-a/out.log, out3.log, out4.log (raw-output capture).

Input:

> [!NOTE]
> Remember this.

The parse direction has no alert concept — the marker becomes ordinary paragraph text !NOTE bracketed as [!NOTE] — and the save direction escapes it (raw bytes verified, not debug-escaped):

> \[!NOTE\] Remember this.

Same result for [!WARNING] and [!TIP], single- and multi-line, and with following paragraphs (all in the probe logs). The visible text a reader sees after one save is the same words, but GitHub's alert rendering keys on the unescaped [!NOTE] marker at the start of the blockquote's first line — after the escape is written, the alert is gone for every future reader, and the literal backslashes are what a raw-markdown reader sees.

Root cause: commonmark_options (pkgs/id/src/web/markdown.rs:81-91) enables strikethrough/tasklist/table/footnotes but not comrak's alerts extension, and the codec has no blockquote-variant representation, so the marker is plain text and the CommonMark renderer escapes the ![ sequence exactly as it would for literal bracket text (compare the wikilink case in the same probe: [[Other Page]] is likewise escaped — correct for literal text, wrong for a construct the parser should have claimed).

Why it matters

Alerts are the standard callout syntax in GitHub READMEs and docs — exactly the files a markdown editor like id is used on. The damage is quiet: the words survive, so nobody notices the callout silently demoted to a plain quote (with stray backslashes in raw form) until the doc is viewed on GitHub. Preservation is the floor; rendering alerts distinctly in the editor is the stretch goal, not a requirement here.

Acceptance criteria

  • > [!NOTE] / [!TIP] / [!IMPORTANT] / [!WARNING] / [!CAUTION] blockquotes round-trip with the marker unescaped at the start of the first quoted line, and the saved form is a fixpoint.
  • The alert body (including multi-paragraph alerts) is preserved; a blockquote that merely starts with bracketed text that is not one of the five alert markers (e.g. > [!NOTE] extra words on the marker line per GitHub's rules, or > [see appendix]) round-trips as a plain blockquote without gaining or losing escapes beyond today's plain-text behaviour.
  • The representation decision (codec-level marker preservation vs a dedicated PM node + editor rendering) is noted in the PR; if a new PM node is introduced, pkgs/id/web/src/editor.ts gains the matching schema entry so the doc stays valid in the editor.
  • Regression tests in pkgs/id/src/web/markdown.rs cover at least NOTE/WARNING round-trips and the non-alert bracket control.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator (new-issue-creator-code-a)
    • Session / ID: cron job new-issue-creator-code-a, run 2026-10-27 03:05 CDT
    • Found via: filed this run
    • Task: Filed after verifying on main 0cbb91b with a verbatim-codec probe crate: GitHub alert blockquotes ([!NOTE]/[!TIP]/[!WARNING] variants probed) save with the marker backslash-escaped (raw bytes checked), demoting the alert to a plain blockquote for every future render. Probe logs in fleet bookkeeping (probe-2026-10-27-creator-a/out.log, out3.log, out4.log).
    • Expectation: effort/m — triage picks a representation (codec marker preservation vs alert node + editor schema), preservation is the floor; non-alert bracket-led blockquotes must stay plain.
    • Links: queue packet enqueued to repo-health-code-pilot (triage) in the same run.
  4. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane A
    • Session / ID: queue task 1342 (repo-queue-worker-shift, 2026-10-31 14:24 CDT)
    • Found via: queue claim
    • Task: Triage id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text #1376 — verify the GitHub alert blockquote round-trip loss against current main, decide representation route, and enqueue the fix if still live.
    • Expectation: effort s (triage); done = findings posted, representation decision recorded, follow-up fix task enqueued (or issue closed with evidence if already fixed).
    • Links: queue task 1342
  5. added
    work/assignedQueue worker lifecycle state
    and removed on Oct 31, 2026
  6. 54 remaining items

  7. added and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. 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 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. 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 4, 2026
  14. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/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