René's URL Explorer Experiment


Title: Add Support for Custom Alert Titles by rdestefa · Pull Request #430 · commonmark/commonmark-java · GitHub

Open Graph Title: Add Support for Custom Alert Titles by rdestefa · Pull Request #430 · commonmark/commonmark-java

X Title: Add Support for Custom Alert Titles by rdestefa · Pull Request #430 · commonmark/commonmark-java

Description: Implements #429 Made an initial attempt at implementing support for custom titles in alerts (#429). I kept running into issues when trying to enhance the post processor because there's no access to an inline parser and it was susceptible to edge cases where inline nodes would overlap between the title and the body. For example: > [!TIP] 2*2 = 4 > But 3*3 = 9 The *s would create an Emphasis node which made splitting out the title text difficult, when in reality those lines should be parsed separately. I decided to try and make a custom AlertBlockParser instead to have more control. I'm not sure if this is the right approach, but it seemed to work well for me. A few things I noticed, though, with this new parser: Alert markers take precedence over link reference definitions. This is opposite of what GitHub does, but in line with what GitLab does. My guess is that this isn't intentional by GitHub, and just a side effect of how they post-process after initial parsing has completed. To me this seems like an extremely rare edge case, and it's more likely the author wanted an alert than a link if they put a marker in that specific spot. Currently lazy continuation is not allowed between the title and the body text, for example: > [!NOTE] Title Lazy body GitHub allows this, but GitLab doesn't. To me the latter seems correct because they are technically two separate nodes. This also seems to be in line with this part of the CommonMark spec. GitHub's support for this also seems unintentional and just a side-effect of it originally being parsed as BlockQuote > Paragraph, and the paragraph allows lazy continuation. This new parser has a configuration to allow alerts to be nested within other blocks (even other alerts). GitHub doesn't allow this, but GitLab does. I could also separate this out into a different PR. Should alerts without a body be allowed? For example: > [!NOTE] > [!NOTE] Title Currently it's not allowed. GitHub disallows this, but GitLab allows it.

Open Graph Description: Implements #429 Made an initial attempt at implementing support for custom titles in alerts (#429). I kept running into issues when trying to enhance the post processor because there's no acces...

X Description: Implements #429 Made an initial attempt at implementing support for custom titles in alerts (#429). I kept running into issues when trying to enhance the post processor because there's no a...

Opengraph URL: https://github.com/commonmark/commonmark-java/pull/430

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8fc357b5-b301-726b-be1e-8f4f7bb4ced3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id80D8:F3916:16594B:1EE4E7:6AFBBC31
html-safe-noncedb318905adb5059e5c55630c5d78e65dc05d1121ddaee7b899355646a292f1fd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEQ4OkYzOTE2OjE2NTk0QjoxRUU0RTc6NkFGQkJDMzEiLCJ2aXNpdG9yX2lkIjoiNDQwMjg1OTcyMzgzMzcxOTg1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3c4c7ef25dbb71c56e949bfd0c33c6a155956e22216abaa8e1e41eec2c933aa4
hovercard-subject-tagpull_request:3601490436
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/commonmark/commonmark-java/pull/430/files
twitter:imagehttps://avatars.githubusercontent.com/u/67760716?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/67760716?s=400&v=4
og:image:altImplements #429 Made an initial attempt at implementing support for custom titles in alerts (#429). I kept running into issues when trying to enhance the post processor because there's no acces...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/commonmark/commonmark-java/pull/430/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommonmark%2Fcommonmark-java%2Fpull%2F430%2Ffiles
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%2Fpull%2F430%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=commonmark%2Fcommonmark-java
Reloadhttps://github.com/commonmark/commonmark-java/pull/430/files
Reloadhttps://github.com/commonmark/commonmark-java/pull/430/files
Reloadhttps://github.com/commonmark/commonmark-java/pull/430/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fcommonmark%2Fcommonmark-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcommonmark%2Fcommonmark-java%2Fissues%2Fnew%2Fchoose
robinsthttps://github.com/robinst
commonmark:mainhttps://github.com/commonmark/commonmark-java/tree/main
rdestefa:issue-429-custom-alert-titleshttps://github.com/rdestefa/commonmark-java/tree/issue-429-custom-alert-titles
Conversation 13 https://github.com/commonmark/commonmark-java/pull/430
Commits 7 https://github.com/commonmark/commonmark-java/pull/430/commits
Checks 6 https://github.com/commonmark/commonmark-java/pull/430/checks
Files changed 15 https://github.com/commonmark/commonmark-java/pull/430/files
Add Support for Custom Alert Titles https://github.com/commonmark/commonmark-java/pull/430/files#top
Show all changes 7 commits https://github.com/commonmark/commonmark-java/pull/430/files
d2df7f6 Add Support for Custom Alert Titles rdestefa May 3, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/d2df7f6763ddcf8b87a08c813cdecc5a410856f9
8968d7b Handle Comment-Only Titles rdestefa May 3, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/8968d7b579e1acbb57a994d9803b2f3f5bbc6ea9
74f4a8a Address Styling Comments rdestefa Jun 1, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/74f4a8a4b06d22e183c457f26f24e70af2edcf9b
f27483f Allow Alerts With No Body rdestefa Jun 1, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/f27483f990744cb6b7a97fe4f692bd9a434fcecc
def81c3 Track Source Positions rdestefa Jun 1, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/def81c30cb434db7c96f0b1aaf244ed37652269b
348d18b Remove HTML Comment Handling rdestefa Jun 1, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/348d18b8ab667157582ff0ca2f60880219b3757e
d09c3c0 Mention Inline Parsing of Titles in AlertsExtension rdestefa Jun 3, 2026 https://github.com/commonmark/commonmark-java/pull/430/commits/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41
Clear filters https://github.com/commonmark/commonmark-java/pull/430/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/430/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/430/files
CHANGELOG.md https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
README.md https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
README.md https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
Alert.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-3cbd1d2ea4352b785110261805f695ad7d782922ea30c86dce8779bacf74dd51
AlertTitle.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-7c35832956b50a1034bbbc3d225c5f086dc4065c9806fd43def42ff960d661f0
AlertsExtension.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
AlertBlockParser.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-bb53d51bafe74a85e6bc7f935f1501f94da92ff04d3693ba1cd84068efccb121
AlertHtmlNodeRenderer.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-f145bcf1a5ec31ccd9f4d02829b283d24b59cc7d334265180a8b01edd96bcf77
AlertMarkdownNodeRenderer.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-23d32c01c90e318f9d5e465d533655e0ab07e9d7233c0d4f2b2d3ebf1198a0df
AlertPostProcessor.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-30b9ed894ed7f1a3a37b4d44400f9d400fdefbc864f9a19bf4c303dedf1fc4b7
AlertsMarkdownRendererTest.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-477ad478eed829fcc3e194598795267df4b0e79ff38c858647e8e55534bb30a7
AlertsSpecTest.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-1fc6a70b28dfbbb7ca9094a1d582ff1ba3ac5c9b921a02d28ad270066d05c71b
AlertsTest.java https://github.com/commonmark/commonmark-java/pull/430/files#diff-53356cd98dfbf76af74d63e8ad6aa19ce85c15c17d71b780f8534a3330ed9da7
alerts-spec-template.md https://github.com/commonmark/commonmark-java/pull/430/files#diff-1b5a87672d4878741adde65d67202ff539f8a5ba08dbce04c349d1dceb654215
alerts-spec.txt https://github.com/commonmark/commonmark-java/pull/430/files#diff-33001321619a08383d2f46b3af41263b352a69893436dddcb99bdacd05b7fd55
CHANGELOG.mdhttps://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/commonmark/commonmark-java/pull/430/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
README.mdhttps://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/430/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
commonmark-ext-gfm-alerts/README.mdhttps://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/commonmark-ext-gfm-alerts/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3ee1554cbecaaa081e56c3ad59475b4ea05e812c8894dc36549eab0fca9a0321
commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/Alert.javahttps://github.com/commonmark/commonmark-java/pull/430/files#diff-3cbd1d2ea4352b785110261805f695ad7d782922ea30c86dce8779bacf74dd51
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/Alert.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3cbd1d2ea4352b785110261805f695ad7d782922ea30c86dce8779bacf74dd51
https://github.com/commonmark/commonmark-java/pull/430/files#diff-3cbd1d2ea4352b785110261805f695ad7d782922ea30c86dce8779bacf74dd51
commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/AlertTitle.javahttps://github.com/commonmark/commonmark-java/pull/430/files#diff-7c35832956b50a1034bbbc3d225c5f086dc4065c9806fd43def42ff960d661f0
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/AlertTitle.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/AlertsExtension.javahttps://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
View file https://github.com/rdestefa/commonmark-java/blob/d09c3c053d7bd17d6892f929bdc5c78fe5de3a41/commonmark-ext-gfm-alerts/src/main/java/org/commonmark/ext/gfm/alerts/AlertsExtension.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/430/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
https://github.com/commonmark/commonmark-java/pull/430/files#diff-4a2cd05448a2b9d82d8b9c92f35984137ac1cebd13a5ffdf9744e54ea4b00ac9
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/430/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/430/files
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.