René's URL Explorer Experiment


Title: id(web): prosemirror_to_markdown keeps only the first text node of a code_block — multi-node blocks are truncated on save · Issue #882 · developing-today/code · GitHub

Open Graph Title: id(web): prosemirror_to_markdown keeps only the first text node of a code_block — multi-node blocks are truncated on save · Issue #882 · developing-today/code

X Title: id(web): prosemirror_to_markdown keeps only the first text node of a code_block — multi-node blocks are truncated on save · Issue #882 · developing-today/code

Description: Bug In pkgs/id/src/web/markdown.rs, json_to_ast's "code_block" arm reads only the first text child of the ProseMirror code block: // markdown.rs:~638-642 (main 45c817e0) let content = json["content"] .as_array() .and_then(|arr| arr.first...

Open Graph Description: Bug In pkgs/id/src/web/markdown.rs, json_to_ast's "code_block" arm reads only the first text child of the ProseMirror code block: // markdown.rs:~638-642 (main 45c817e0) let content = json["content...

X Description: Bug In pkgs/id/src/web/markdown.rs, json_to_ast's "code_block" arm reads only the first text child of the ProseMirror code block: // markdown.rs:~638-642 (main 45c817e0) let content =...

Opengraph URL: https://github.com/developing-today/code/issues/882

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web): prosemirror_to_markdown keeps only the first text node of a code_block — multi-node blocks are truncated on save","articleBody":"## Bug\n\nIn `pkgs/id/src/web/markdown.rs`, `json_to_ast`'s `\"code_block\"` arm reads only the **first** text child of the ProseMirror code block:\n\n```rust\n// markdown.rs:~638-642 (main 45c817e0)\nlet content = json[\"content\"]\n    .as_array()\n    .and_then(|arr| arr.first())\n    .and_then(|n| n[\"text\"].as_str())\n    .unwrap_or(\"\");\n```\n\nA code block whose ProseMirror content is split into more than one text node — which editors produce legitimately, e.g. after collaborative merges, paste operations, or syntax-token boundaries in the client — silently loses every node after the first on save.\n\n## Verified repro (this run, main 45c817e0)\n\nTemporary probe test run with `cargo test --features web --lib web::markdown::` (probe removed after the run; assertion below is the acceptance test):\n\nProseMirror input:\n\n```json\n{\n  \"type\": \"doc\",\n  \"content\": [{\n    \"type\": \"code_block\",\n    \"attrs\": {\"params\": \"rust\"},\n    \"content\": [\n      {\"type\": \"text\", \"text\": \"fn a() {}\\n\"},\n      {\"type\": \"text\", \"text\": \"fn b() {}\"}\n    ]\n  }]\n}\n```\n\n`prosemirror_to_markdown` emits:\n\n````\n```rust\nfn a() {}\n```\n````\n\n`fn b() {}` is deleted with no error. (The single-node form the codec's own parser produces works, which is why the existing tests — e.g. `test_pm_to_md_table`-era code-block tests — never caught this: the loss only appears once a real editor or a collab peer splits the text.)\n\n## Why it matters\n\nThis is the save path for the id web editor, and `id` is a collaborative system: a code block edited by multiple peers is exactly the content most likely to arrive as several text nodes. Saving silently truncates the block to its first node — data loss in the same codec family as #872/#873/#879/#880/#881, but a distinct arm (`code_block` in `json_to_ast`).\n\n## Suggested fix\n\nConcatenate the `text` of **all** children of the code block (skipping/handling non-text children the same way the first-child code does today — i.e. treat a missing `text` as empty rather than aborting), e.g.:\n\n```rust\nlet content = json[\"content\"].as_array().map_or(String::new(), |arr| {\n    arr.iter().filter_map(|n| n[\"text\"].as_str()).collect()\n});\n```\n\nand keep the existing `format!(\"{content}\\n\")` literal construction.\n\n## Acceptance criteria\n\n- [ ] Regression test: a `code_block` with two or more text children round-trips with all text present, in order.\n- [ ] Single-node and empty code blocks behave exactly as before.\n- [ ] Existing `web::markdown` tests still pass (`cargo test --features web --lib web::markdown::`).\n- [ ] Coordination: PR #878 (for #872/#873) is in flight in the same file — sequence or rebase so the img-codec changes do not conflict.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-25T13:24:04Z","url":"https://github.com/developing-today/code/issues/882"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fff4f3b1-8d3a-e6fe-20c2-c46e08259e2d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB55A:EC78C:AADCC7:E41165:6B06413B
html-safe-nonce42e43e259efc0060574a4a225441fd42917825467c152f0e59f2fc7c472c7db0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTVBOkVDNzhDOkFBRENDNzpFNDExNjU6NkIwNjQxM0IiLCJ2aXNpdG9yX2lkIjoiMzc2ODMwMDY3ODMzNTA1NDEzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccae146df31aa39ae4dc51a2943440f68ae24405026e40fecc32690a3f3bbf69d
hovercard-subject-tagissue:6024918999
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/882/issue_layout
twitter:imagehttps://opengraph.githubassets.com/043dc54c75a1813774281087e53b9f027233706da7ec21f291a494e042c35910/developing-today/code/issues/882
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/043dc54c75a1813774281087e53b9f027233706da7ec21f291a494e042c35910/developing-today/code/issues/882
og:image:altBug In pkgs/id/src/web/markdown.rs, json_to_ast's "code_block" arm reads only the first text child of the ProseMirror code block: // markdown.rs:~638-642 (main 45c817e0) let content = json["content...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseac613d3698d3d8565651455086e1f74da07bf277
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/882#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F882
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F882
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/882
Reloadhttps://github.com/developing-today/code/issues/882
Reloadhttps://github.com/developing-today/code/issues/882
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests172 (172)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/882
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/882
#888https://github.com/developing-today/code/pull/888
id(web): prosemirror_to_markdown keeps only the first text node of a code_block — multi-node blocks are truncated on savehttps://github.com/developing-today/code/issues/882#top
#888https://github.com/developing-today/code/pull/888
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 25, 2026https://github.com/developing-today/code/issues/882#issue-6024918999
45c817ehttps://github.com/developing-today/code/commit/45c817e05226086d0b7a15f2c0d96a75b4b31a4a
#872https://github.com/developing-today/code/issues/872
#873https://github.com/developing-today/code/issues/873
#879https://github.com/developing-today/code/issues/879
#880https://github.com/developing-today/code/issues/880
#881https://github.com/developing-today/code/issues/881
fix(id-web): img attribute codec — sequential parse, escaped emission (#872, #873) #878https://github.com/developing-today/code/pull/878
id(web): parse_img_tag substring search lets data-src/data-width shadow the real img attributes — save rewrites the image URL #872https://github.com/developing-today/code/issues/872
id(web): prosemirror_to_markdown emits img src/alt/title unescaped — quotes truncate values and can inject attributes on reparse #873https://github.com/developing-today/code/issues/873
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 25, 2026https://github.com/developing-today/code/issues/882#event-34183693266
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 25, 2026https://github.com/developing-today/code/issues/882#issuecomment-6398380253
45c817ehttps://github.com/developing-today/code/commit/45c817e05226086d0b7a15f2c0d96a75b4b31a4a
#879https://github.com/developing-today/code/issues/879
dezren39https://github.com/dezren39
on Oct 25, 2026https://github.com/developing-today/code/issues/882#event-34192083066
fix(id-web): codec round-trip — linked images, table alignment, multi…https://github.com/developing-today/code/commit/9cbbb0a0b6fe880c3e45412bd4620bef73387373
9cbbb0ahttps://github.com/developing-today/code/commit/9cbbb0a0b6fe880c3e45412bd4620bef73387373
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#888https://github.com/developing-today/code/pull/888
on Oct 25, 2026https://github.com/developing-today/code/issues/882#event-34192083134
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/882
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/882
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.