Skip to content

fix: handle implicit and collapsed reference links in markdown #2265#2269

Open
h30s wants to merge 3 commits intojson-schema-org:mainfrom
h30s:fix/markdown-links-2265
Open

fix: handle implicit and collapsed reference links in markdown #2265#2269
h30s wants to merge 3 commits intojson-schema-org:mainfrom
h30s:fix/markdown-links-2265

Conversation

@h30s
Copy link
Copy Markdown

@h30s h30s commented Feb 23, 2026

What kind of change does this PR introduce?

Bugfix

Issue Number:

Screenshots/videos:

N/A (Logic fix verified with Cypress component tests)

If relevant, did you update the documentation?

No

Summary

Fixed transformMarkdownLinks regex to correctly parse implicit [text][] and collapsed [text] reference links. It also now supports the optional space between brackets like [text] [id], making it fully spec-compliant. Added Cypress tests to verify all variants.

Does this PR introduce a breaking change?

No

Checklist

Please ensure the following tasks are completed before submitting this pull request.

@h30s h30s requested a review from a team as a code owner February 23, 2026 10:55
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Feb 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 23, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview eb8f26e

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.15%. Comparing base (2ee67ff) to head (eb8f26e).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##              main    #2269       +/-   ##
============================================
- Coverage   100.00%   85.15%   -14.85%     
============================================
  Files           30       34        +4     
  Lines          663      822      +159     
  Branches       205      246       +41     
============================================
+ Hits           663      700       +37     
- Misses           0      122      +122     

see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@h30s
Copy link
Copy Markdown
Author

h30s commented Feb 23, 2026

@vtushar06 @Utkarsh-123github Please take a look whenever you have time. The PR is ready from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

🐛 Bug: transformMarkdownLinks regex fails on implicit and collapsed reference links

1 participant