Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): various broken anchor link fixes #9732

Merged
merged 25 commits into from
Jan 12, 2024

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jan 11, 2024

Motivation

Fix some edge cases in the newly released (v3.1) broken link checker anchor support

Previous implementation did not report broken local anchor links such as [local link](#local-heading-id), among other things. As a result it didn't detect all the broken links we had on our own website.

Also fix #9717, edge case related to encoding of the anchor id

MDX elements such as <li> (used in footnotes), and <details> should also collect anchor ids

I'll explore making this more automatic in the future but for now it's a good-enough improvement.

Test Plan

unit tests + dogfood

Test links

https://deploy-preview-9732--docusaurus-2.netlify.app/

@slorber slorber added pr: bug fix This PR fixes a bug in a past release. to backport This PR is planned to be backported to a stable version of Docusaurus labels Jan 11, 2024
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jan 11, 2024
Copy link

github-actions bot commented Jan 11, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 74 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 85 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 75 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 70 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 64 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 68 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 77 🟢 100 🟢 100 🟢 90 🟠 89 Report

@slorber slorber mentioned this pull request Jan 11, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release. to backport This PR is planned to be backported to a stable version of Docusaurus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onBrokenAnchors fails with unicode
3 participants