-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
When a GitBook site is synced bidirectionally with GitHub, broken internal file references (mentions) are incorrectly rendered as links to the GitHub repository instead of being handled as broken links or showing an error message.
Current Behavior
The broken internal reference is automatically converted to a GitHub repository URL pointing to the non-existent file path.
Example markdown referencing a no longer existing file:
See further documentation [mytool.md](mytool.md "mention")This results in the rendered documentation on the GitBook site to look like this with a fully rendered GitHub link:
See further documentation on https://github.com/<githubuser>/<githubrepo>/blob/main/documentation/mytool.md
(with the full link explicitly embedded into the text instead of being placed behind the "mytool" text)
The link is clickable but obviously results in a 404 error, as the file obviously doesn't exist in the repository.
Expected Behavior
When a Markdown file references a non-existent local file using the mention syntax, GitBook should:
- Display a broken link indicator, OR
- Show an error/warning in the editor, OR
- Render the original link as plain text