-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Broken link found where it should not on relative (same folder) link #9876
Comments
I added a minimal reproductible example here https://github.com/axel7083/docusaurus-reproductible-broken-link |
cc @slorber |
The problem is not in the broken link checker. Markdown relative file links should be resolved before reaching the broken link checker, and not end with The problem is in our legacy A minimal repro: ```something```
[test](test.md) It's not clear to me why you use "inline triple backticks" instead of regular inline code blocks, but you can probably fix the problem by migrating to regular inline code blocks. The solution should be #9048, so I'm closing this issue as a duplicate. |
The markdown is generated by https://github.com/tgreyuk/typedoc-plugin-markdown |
I see thanks, will track the issue to see what the author has to say. |
This is a very nasty bug and hard to debug! Please support triple backticks! |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Error message got
Let's break it down. On page
/api/interfaces/EndpointSettings
specifically, let's find the link to theEndpointIPAMConfig.md
file.[EndpointIPAMConfig](EndpointIPAMConfig.md)
Debugging the issue.
Let's run the debugger for the building process. I added some breakpoints in the
handleBrokenLinks
.Inside the
isPathBrokenLink
we got the following, when we reachedlinkPath === { "pathname": "/api/interfaces/EndpointIPAMConfig.md" }
Let's evaluate the
validPathnames
(used for optimizations).md
Since the file with the
.md
suffix is not included in the validPathnames, we result in calling thereact-router-config
methodmatchRoutes
.However it has not any chance of success since this are the provided arguments
Resulting in the link being added to the brokens list
Reproducible demo
No response
Steps to reproduce
(1) git clone https://github.com/axel7083/docusaurus-reproductible-broken-link
(2) npm install
(3) npm run build
Wait and see
Expected behavior
Not detecting a broken links as it is not one
Actual behavior
Broken link detected
Your environment
Self-service
The text was updated successfully, but these errors were encountered: