Title: id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text · Issue #1376 · developing-today/code · GitHub
Open Graph Title: id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text · Issue #1376 · developing-today/code
X Title: id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text · Issue #1376 · developing-today/code
Description: 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 con...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/developing-today/code/issues/1376
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web): GitHub alert blockquotes lose their alert on save — [!NOTE] marker is backslash-escaped into plain text","articleBody":"## Problem\n\nGitHub 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.\n\n## Evidence (verified this run on main `0cbb91b1`)\n\nProbe: 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).\n\nInput:\n\n```markdown\n> [!NOTE]\n> Remember this.\n```\n\nThe 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):\n\n```markdown\n> \\[!NOTE\\] Remember this.\n```\n\nSame 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.\n\nRoot 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).\n\n## Why it matters\n\nAlerts 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.\n\n## Acceptance criteria\n\n- [ ] `> [!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.\n- [ ] 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.\n- [ ] 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.\n- [ ] Regression tests in `pkgs/id/src/web/markdown.rs` cover at least NOTE/WARNING round-trips and the non-alert bracket control.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-27T08:50:36Z","url":"https://github.com/developing-today/code/issues/1376"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:92114309-1e0d-b905-dada-e1b2c52131b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8148:1913E0:1907452:22B3D6E:6B06DBCF |
| html-safe-nonce | 6286009ffa40c6ae5796d719051a95263a54b3c2a170273cd9a53bd8f17a6ffc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTQ4OjE5MTNFMDoxOTA3NDUyOjIyQjNENkU6NkIwNkRCQ0YiLCJ2aXNpdG9yX2lkIjoiMTM2MDIzOTAwNjU0OTcyODIwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3f58f8d8d4d7650182ac3ca34e95f60fc9245f432374b358f24f63021a49e1e0 |
| hovercard-subject-tag | issue:6055913431 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/23ecbf3f1229de48f9d3b8195025966d2bd589b417bde32420335079945b578e/developing-today/code/issues/1376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/23ecbf3f1229de48f9d3b8195025966d2bd589b417bde32420335079945b578e/developing-today/code/issues/1376 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06cadd0061c549662a50be90eb5baba7608f00f521574931eec01db0deb9e636 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6953c712585a8d7406b7695e48fffcb670fd241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width