René's URL Explorer Experiment


Title: Better YAML front matter parsing in commonmark-ext-yaml-front-matter by zyxist · Pull Request #445 · commonmark/commonmark-java · GitHub

Open Graph Title: Better YAML front matter parsing in commonmark-ext-yaml-front-matter by zyxist · Pull Request #445 · commonmark/commonmark-java

X Title: Better YAML front matter parsing in commonmark-ext-yaml-front-matter by zyxist · Pull Request #445 · commonmark/commonmark-java

Description: Last year, I reported the issue #391 - I found some time to turn it into the contribution, based on the outcome of the discussion. I will be happy to discuss the approach and apply any improvements, if necessary. Summary The PR splits the YAML front matter processing into two parts: Finding front matter delimiters Processing the captured front matter content with the new concept of YamlFrontMatterExtractor. I moved the existing built-in parser of YAML subset into one of the two extractors: YamlDataExtractor. The other extractor is YamlContentExtractor that extracts the front matter as a string for further processing with other tools. Compatibility The changes are backward-compatible. YamlDataExtractor is the default extractor, and one must explicitly initialize the extension with YamlContentExtractor to get the string content. The visitor and Markdown renderer support both modes. Naming For the existing parser, I strived to keep consistent naming to help understand the connection: YamlFrontMatterVisitor.getData() (existing method) => YamlDataExtractor.

Open Graph Description: Last year, I reported the issue #391 - I found some time to turn it into the contribution, based on the outcome of the discussion. I will be happy to discuss the approach and apply any improvements...

X Description: Last year, I reported the issue #391 - I found some time to turn it into the contribution, based on the outcome of the discussion. I will be happy to discuss the approach and apply any improvements...

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

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:30f7b6ec-c157-d761-2e21-a321dc755582
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBAAC:ABEA3:3D58EB:511AB4:6AFBBBCC
html-safe-nonce929dfa1ef5fc7011c63639cd1b43aaa4062ef018ad9ad35139f1d823ae6bc582
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUFDOkFCRUEzOjNENThFQjo1MTFBQjQ6NkFGQkJCQ0MiLCJ2aXNpdG9yX2lkIjoiNjI1MzcwMTc4MzI2OTEyOTE2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8f6bb57260f25c795b6c60c7d0275e95145a498569838a207a3beef01375c1ed
hovercard-subject-tagpull_request:4183884474
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/445/files
twitter:imagehttps://avatars.githubusercontent.com/u/283244?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/283244?s=400&v=4
og:image:altLast year, I reported the issue #391 - I found some time to turn it into the contribution, based on the outcome of the discussion. I will be happy to discuss the approach and apply any improvements...
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/445/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommonmark%2Fcommonmark-java%2Fpull%2F445%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%2F445%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/445/files
Reloadhttps://github.com/commonmark/commonmark-java/pull/445/files
Reloadhttps://github.com/commonmark/commonmark-java/pull/445/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
zyxist:yaml-front-matter-extractorshttps://github.com/zyxist/commonmark-java/tree/yaml-front-matter-extractors
Conversation 11 https://github.com/commonmark/commonmark-java/pull/445
Commits 3 https://github.com/commonmark/commonmark-java/pull/445/commits
Checks 6 https://github.com/commonmark/commonmark-java/pull/445/checks
Files changed 17 https://github.com/commonmark/commonmark-java/pull/445/files
Better YAML front matter parsing in commonmark-ext-yaml-front-matter https://github.com/commonmark/commonmark-java/pull/445/files#top
Show all changes 3 commits https://github.com/commonmark/commonmark-java/pull/445/files
614abc1 Add support for different YAML front matter extractors in commonmark-… zyxist Aug 1, 2026 https://github.com/commonmark/commonmark-java/pull/445/commits/614abc159d31ae0b1ef46540f838c76d2aad2a9c
2b264be fix: rework naming and improve FrontMatterParser interface zyxist Aug 2, 2026 https://github.com/commonmark/commonmark-java/pull/445/commits/2b264befeb501d1561c1200ccb2333cad8924dd0
5f4778b fix: move FrontMatterParser to parser package, cosmetic naming fixes zyxist Aug 4, 2026 https://github.com/commonmark/commonmark-java/pull/445/commits/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3
Clear filters https://github.com/commonmark/commonmark-java/pull/445/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/445/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/445/files
README.md https://github.com/commonmark/commonmark-java/pull/445/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
module-info.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-ad25a74e18c395aa9c7e4d9acac46ccd46beb0e306ed78b6c9aa7e7af0dac07a
YamlFrontMatterExtension.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-1df8f8d5eac817f85f76bfd5985b36577608bf11cd74c48877800a26c5ccea44
YamlFrontMatterRawContent.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-9082b97c52d68c978512bc9b1a8ab252f323715da7208d9ba6d8eb5b19c6c4ce
YamlFrontMatterVisitor.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-3c013de1ab1704efa8d81f8ebc790ddb983dbd0b67607cb8dc073f7846c5b5c0
YamlFrontMatterBlockParser.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-cbf244ff8f9379a314eff35f57f902ce2493d74efa3ce4f832a4a20fc54fa4fb
YamlFrontMatterMarkdownNodeRenderer.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-ed30588d6d367d7d6fda9c1943dbb00ad707069d3ad661594b126f7547359c9c
FrontMatterParser.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-56b85be1c79759ad7bb7ceee7da4a898adc99615e0b6490340bef076002027f4
RawContentParser.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-5ed41ec83eff6228348f4514e48a47122c0e2a3362afdf0639185de5c3bddeff
YamlSubsetParser.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-2d0825debb6ce6064d99c3a69ab476084cb9ad9976191ee554aa0298f7f55f83
YamlFrontMatterCustomParserTest.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-6fa6d9e2bbe370b26b76b410e53237f3c55b1400cea7653aa846091098619d71
YamlFrontMatterDataTest.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-23eec29459b0433dd640ebf3e554c6c8b73c44f8cbdf1c2e7f90a5b88d45946e
YamlFrontMatterMarkdownRendererDataTest.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-7014fb3c506a58501d4c9995e7f1c4fb37634fa6e36e129992651a7e610869bf
YamlFrontMatterMarkdownRendererRawContentTest.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-af2d20e04b91038add9f2c9cd88c6f10e808dcdf9cb229cb157ce04da974f23d
YamlFrontMatterMarkdownRendererTestCase.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-0838117de6568d4e0901de9b588bdafc92a8955a6a54417aa6c29a6244ccca69
YamlFrontMatterRawContentTest.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-21af355733c9421412d1b599ac417df0a1cb66bdb70a8abab28713995cd93b34
YamlFrontMatterTestCase.java https://github.com/commonmark/commonmark-java/pull/445/files#diff-66a5663a9bfdf56c8f3c70c864cb56fc42af63259251f70390b52529568b8af7
README.mdhttps://github.com/commonmark/commonmark-java/pull/445/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/445/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/445/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/commonmark/commonmark-java/pull/445/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
commonmark-ext-yaml-front-matter/src/main/java/module-info.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-ad25a74e18c395aa9c7e4d9acac46ccd46beb0e306ed78b6c9aa7e7af0dac07a
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/module-info.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
...-front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterExtension.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-1df8f8d5eac817f85f76bfd5985b36577608bf11cd74c48877800a26c5ccea44
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterExtension.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/445/files#diff-1df8f8d5eac817f85f76bfd5985b36577608bf11cd74c48877800a26c5ccea44
https://github.com/commonmark/commonmark-java/pull/445/files#diff-1df8f8d5eac817f85f76bfd5985b36577608bf11cd74c48877800a26c5ccea44
...front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterRawContent.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-9082b97c52d68c978512bc9b1a8ab252f323715da7208d9ba6d8eb5b19c6c4ce
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterRawContent.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
...ml-front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterVisitor.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-3c013de1ab1704efa8d81f8ebc790ddb983dbd0b67607cb8dc073f7846c5b5c0
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/org/commonmark/ext/front/matter/YamlFrontMatterVisitor.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/445/files#diff-3c013de1ab1704efa8d81f8ebc790ddb983dbd0b67607cb8dc073f7846c5b5c0
...er/src/main/java/org/commonmark/ext/front/matter/internal/YamlFrontMatterBlockParser.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-cbf244ff8f9379a314eff35f57f902ce2493d74efa3ce4f832a4a20fc54fa4fb
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/org/commonmark/ext/front/matter/internal/YamlFrontMatterBlockParser.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/445/files#diff-cbf244ff8f9379a314eff35f57f902ce2493d74efa3ce4f832a4a20fc54fa4fb
https://github.com/commonmark/commonmark-java/pull/445/files#diff-cbf244ff8f9379a314eff35f57f902ce2493d74efa3ce4f832a4a20fc54fa4fb
https://github.com/commonmark/commonmark-java/pull/445/files#diff-cbf244ff8f9379a314eff35f57f902ce2493d74efa3ce4f832a4a20fc54fa4fb
...in/java/org/commonmark/ext/front/matter/internal/YamlFrontMatterMarkdownNodeRenderer.javahttps://github.com/commonmark/commonmark-java/pull/445/files#diff-ed30588d6d367d7d6fda9c1943dbb00ad707069d3ad661594b126f7547359c9c
View file https://github.com/zyxist/commonmark-java/blob/5f4778b90381dbc3b4983b72885f73b1f7fcf6f3/commonmark-ext-yaml-front-matter/src/main/java/org/commonmark/ext/front/matter/internal/YamlFrontMatterMarkdownNodeRenderer.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commonmark/commonmark-java/pull/445/{{ revealButtonHref }}
https://github.com/commonmark/commonmark-java/pull/445/files#diff-ed30588d6d367d7d6fda9c1943dbb00ad707069d3ad661594b126f7547359c9c
https://github.com/commonmark/commonmark-java/pull/445/files#diff-ed30588d6d367d7d6fda9c1943dbb00ad707069d3ad661594b126f7547359c9c
https://github.com/commonmark/commonmark-java/pull/445/files#diff-ed30588d6d367d7d6fda9c1943dbb00ad707069d3ad661594b126f7547359c9c
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/445/files
Please reload this pagehttps://github.com/commonmark/commonmark-java/pull/445/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.