René's URL Explorer Experiment


Title: Unclosed link reference definition title keeps the partial title and the following paragraph's source spans (0.30.0) · Issue #460 · commonmark/commonmark-java · GitHub

Open Graph Title: Unclosed link reference definition title keeps the partial title and the following paragraph's source spans (0.30.0) · Issue #460 · commonmark/commonmark-java

X Title: Unclosed link reference definition title keeps the partial title and the following paragraph's source spans (0.30.0) · Issue #460 · commonmark/commonmark-java

Description: Summary When a link reference definition is followed by a line that opens a title delimiter (", ' or () and the title is never closed before the end of the paragraph, commonmark-java 0.30.0 keeps the partial title on the LinkReferenceDef...

Open Graph Description: Summary When a link reference definition is followed by a line that opens a title delimiter (", ' or () and the title is never closed before the end of the paragraph, commonmark-java 0.30.0 keeps t...

X Description: Summary When a link reference definition is followed by a line that opens a title delimiter (", ' or () and the title is never closed before the end of the paragraph, commonmark-java 0.30....

Opengraph URL: https://github.com/commonmark/commonmark-java/issues/460

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unclosed link reference definition title keeps the partial title and the following paragraph's source spans (0.30.0)","articleBody":"### Summary\n\nWhen a link reference definition is followed by a line that opens a title delimiter (`\"`, `'` or `(`) and the title is never closed before the end of the paragraph, `commonmark-java` 0.30.0 keeps the **partial** title on the `LinkReferenceDefinition` and attaches the source spans of the title lines to the definition. The text of those lines is still parsed as a `Paragraph` (rendered correctly), but that `Paragraph` has **no source spans**.\n\nThe spec says a title must be enclosed in matching delimiters (0.31.2, §6.3 \"link title\") and that \"No further character may occur\" after a definition (§4.7); when the title does not close, the definition has no title and the following lines are a paragraph (this is what `cmark` and `pulldown-cmark` do). Issue #315 (fixed by #318 in 0.23.0, \"the title was set to the partially-parsed title and the source spans were wrong\") covers the sibling case where the title closes and is followed by garbage on the same line; the end-of-paragraph case is not covered by those tests.\n\n### Reproduction (0.30.0, `Parser.builder().includeSourceSpans(IncludeSourceSpans.BLOCKS_AND_INLINES).build()`)\n\nInput 1:\n\n```\n[1]: https://example.org/a\n(ver tambem https://example.org/b\n\n[1]\n```\n\nObserved:\n\n```\nLinkReferenceDefinition label=\"1\" dest=\"https://example.org/a\" title=\"ver tambem https://example.org/b\\n\" spans=[0,26)[27,60)\nParagraph spans=NONE\n  Text lit=\"(ver tambem https://example.org/b\" spans=[27,60)\nParagraph spans=[62,65)\n  Link dest=\"https://example.org/a\" title=\"ver tambem https://example.org/b\\n\" spans=[62,65)\n```\n\nExpected: definition with `title=null` and spans `[0,26)`; the paragraph `(ver tambem https://example.org/b` with spans `[27,60)`. The HTML output already renders the paragraph; only the title and the spans are wrong.\n\nInput 2 (double-quote variant):\n\n```\n[a]: https://example.org/x\n\"https://example.org/t\nmais\n\n[a]\n```\n\nObserved: `title=\"https://example.org/t\\nmais\\n\"`, definition spans `[0,26)[27,49)[50,54)`, and the `Paragraph` has no spans.\n\nInput 3 (the #315 case still has a residual span problem): with `\"t1\\nt2\" lixo` after the definition, the title is correctly discarded, but the span `[27,30)` of the first title line stays on the definition while the `Paragraph` only gets `[31,39)`.\n\n### Where\n\n`internal/LinkReferenceDefinitionParser.java`: `title()` keeps collecting across lines (`:251-256`) and `finishReference()` uses the partial title and all collected spans (`:275-291`); `ParagraphParser.java:58-68` then builds the paragraph from the remaining lines after the definition parser already consumed their spans.\n\n### Impact\n\nTools that map nodes back to the source by `SourceSpan` (we use it to find which parts of a document are covered by definitions) see the paragraph as part of the definition. We work around it on our side by refusing documents where a renderable node has no source position, until a fix is available.\n\nReproduced with the `commonmark-0.30.0.jar` from Maven Central on JDK 17 (0.30.0 is the latest release as of 2026-10-06).\n\n_Investigated and written with Claude Code while porting a link checker to Android; the reproduction above was run on our side._","author":{"url":"https://github.com/lcv-leo","@type":"Person","name":"lcv-leo"},"datePublished":"2026-10-06T16:16:11Z","url":"https://github.com/commonmark/commonmark-java/issues/460"}

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:9d26390a-6a14-2e88-8359-c910183e618b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD596:20C35B:1936B3:21664A:6AFBB24A
html-safe-nonceb652b9fb99ffd42c6f6347129ab78d9e25ca662fcbe0f440edb77b7d99c56d21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTk2OjIwQzM1QjoxOTM2QjM6MjE2NjRBOjZBRkJCMjRBIiwidmlzaXRvcl9pZCI6IjUzMzgwNDkxMTk3OTUyNjIwMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac41d05b1eb3b4bab8b0decef013085f63b0ba5f539df4b92e022791b240b5375b
hovercard-subject-tagissue:5731736184
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/commonmark/commonmark-java/460/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c90d4d155fa55311b88e622f2c50a29dca8faef3f4f13bf10d23a67899571e77/commonmark/commonmark-java/issues/460
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c90d4d155fa55311b88e622f2c50a29dca8faef3f4f13bf10d23a67899571e77/commonmark/commonmark-java/issues/460
og:image:altSummary When a link reference definition is followed by a line that opens a title delimiter (", ' or () and the title is never closed before the end of the paragraph, commonmark-java 0.30.0 keeps t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelcv-leo
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
go-importgithub.com/commonmark/commonmark-java git https://github.com/commonmark/commonmark-java.git
octolytics-dimension-user_id8661225
octolytics-dimension-user_logincommonmark
octolytics-dimension-repository_id39477878
octolytics-dimension-repository_nwocommonmark/commonmark-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id39477878
octolytics-dimension-repository_network_root_nwocommonmark/commonmark-java
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
releasee4cce0e99cf61481a318ff12c2e8580153a6c7c6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/commonmark/commonmark-java/issues/460#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommonmark%2Fcommonmark-java%2Fissues%2F460
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%2Fcommonmark%2Fcommonmark-java%2Fissues%2F460
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=commonmark%2Fcommonmark-java
Reloadhttps://github.com/commonmark/commonmark-java/issues/460
Reloadhttps://github.com/commonmark/commonmark-java/issues/460
Reloadhttps://github.com/commonmark/commonmark-java/issues/460
commonmarkhttps://github.com/commonmark
commonmark-javahttps://github.com/commonmark/commonmark-java
Codehttps://github.com/commonmark/commonmark-java
Issues9 (9)https://github.com/commonmark/commonmark-java/issues
Pull requests4 (4)https://github.com/commonmark/commonmark-java/pulls
Actionshttps://github.com/commonmark/commonmark-java/actions
Wikihttps://github.com/commonmark/commonmark-java/wiki
Security and quality8 (8)https://github.com/commonmark/commonmark-java/security
Insightshttps://github.com/commonmark/commonmark-java/pulse
https://github.com/commonmark/commonmark-java
New issuehttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/460
New issuehttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/460
#465https://github.com/commonmark/commonmark-java/pull/465
Unclosed link reference definition title keeps the partial title and the following paragraph's source spans (0.30.0)https://github.com/commonmark/commonmark-java/issues/460#top
#465https://github.com/commonmark/commonmark-java/pull/465
https://github.com/lcv-leo
lcv-leohttps://github.com/lcv-leo
on Oct 6, 2026https://github.com/commonmark/commonmark-java/issues/460#issue-5731736184
#315https://github.com/commonmark/commonmark-java/issues/315
#318https://github.com/commonmark/commonmark-java/pull/318
#315https://github.com/commonmark/commonmark-java/issues/315
https://github.com/robinst
robinsthttps://github.com/robinst
on Oct 10, 2026https://github.com/commonmark/commonmark-java/issues/460#issuecomment-6097782430
robinsthttps://github.com/robinst
completedhttps://github.com/commonmark/commonmark-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#465https://github.com/commonmark/commonmark-java/pull/465
on Oct 22, 2026https://github.com/commonmark/commonmark-java/issues/460#event-33933214805
https://github.com/robinst
robinsthttps://github.com/robinst
on Oct 22, 2026https://github.com/commonmark/commonmark-java/issues/460#issuecomment-6339426725
https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0310---2026-10-22https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0310---2026-10-22
Sign up for freehttps://github.com/signup?return_to=https://github.com/commonmark/commonmark-java/issues/460
Sign in to commenthttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/460
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

Viewport: width=device-width


URLs of crawlers that visited me.