Skip to content

fix: resolve internal markdown link routing (#2267)#2268

Open
h30s wants to merge 1 commit intojson-schema-org:mainfrom
h30s:fix/internal-link-routing-2267
Open

fix: resolve internal markdown link routing (#2267)#2268
h30s wants to merge 1 commit intojson-schema-org:mainfrom
h30s:fix/internal-link-routing-2267

Conversation

@h30s
Copy link

@h30s h30s commented Feb 23, 2026

What kind of change does this PR introduce?
Bugfix

Issue Number:

Screenshots/videos:
N/A

If relevant, did you update the documentation?
N/A

Summary
Internal Markdown links in StyledMarkdownBlock were incorrectly forced to open in new tabs (target="_blank") and routed to the homepage (/), which broke SPA transitions and Next.js prefetching.

This PR updates the routing logic to properly recognize internal paths (starting with / or #) and uses the Next.js <Link> component correctly without target="_blank", restoring standard client-side navigation.

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 09:05
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Feb 23, 2026
@github-actions
Copy link

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 d33281e

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2268   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          663       663           
  Branches       205       205           
=========================================
  Hits           663       663           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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
Author

h30s commented Feb 23, 2026

@vtushar06 Ready for review. Please take a look whenever you have time.

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: Internal Markdown links break client-side routing and prefetching in StyledMarkdownBlock

1 participant