fix(docs): repair markdown links left pointing at a tilde path - #224
Merged
Conversation
The home-path redaction rewrote absolute link targets to ~/... , but no markdown renderer expands a tilde. Every one of those resolved as a path relative to the containing file and opened nothing: the link reads correctly in the source and is dead everywhere it is actually followed. The targets are repo-relative now, and each rewritten one was checked to exist on disk before being changed. Line anchors are preserved. Two links are deliberately left as they are. They point at src/types/index.ts and src/components/FollowUps/FollowUpsTab.tsx, neither of which exists in this repository any more, so rewriting them would turn a visibly odd dead link into an ordinary-looking dead one. They need a decision about the document, not a path substitution. Also fixes one link in the same file that was already broken before this: the roadmap was linked as docs/plans/product-improvements-roadmap.md from a file inside docs/plans/, so it resolved to docs/plans/docs/plans/... . Verified: 80 of 82 non-external links in the changed files now resolve on disk; the 2 that do not are the deliberate pair above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repairs Markdown links that the home-path redaction left pointing at a tilde.
The redaction rewrote absolute link targets like
/Users/<user>/Projects/<repo>/src/foo.rsinto~/Projects/<repo>/src/foo.rs.That is correct for prose, and wrong here: no Markdown renderer expands a
tilde. Each of those resolved as a path relative to the containing file — so a
link in
docs/plans/resolved todocs/plans/~/Projects/...and opened nothing.The links read correctly in the source and were dead everywhere they were
actually followed. This was first caught by review on a different repository's
redaction pull request; this is the same defect found by sweeping for the
pattern across everything the redaction touched.
Targets are repo-relative now. Every rewritten target was checked to exist on
disk before being changed, and line anchors (
#L123) are preserved.Deliberately not rewritten (AssistSupport only): two links point at
src/types/index.tsandsrc/components/FollowUps/FollowUpsTab.tsx, neither ofwhich exists in this repository any more. Rewriting them would turn a visibly
odd dead link into an ordinary-looking dead one. They need a decision about the
document, not a path substitution.
Also fixed (AssistSupport only): one link that was already broken before the
redaction — the roadmap was linked as
docs/plans/product-improvements-roadmap.mdfrom a file already inside
docs/plans/, so it resolved todocs/plans/docs/plans/....Documentation only. No source, configuration, or test file is touched.