Skip to content

broken-link-candidates

Where did a missing link target go? Pure, no App: every question about which file a broken link most likely meant is answerable from a list of paths, the notes’ aliases and titles, and the vault’s git renames.

A rename is not recoverable from the link alone: a link to alpha/bravo/charlie/!.md says nothing about charlie having become delta. So every candidate carries the evidence that produced it, from outside the link, and the finder never picks one of several: a caller offers a one-click fix only when exactly one candidate exists.

Class Description
BrokenLinkCandidateFinder Finds the candidates for missing link targets, from one snapshot of the vault.
Interface Description
BrokenLinkCandidate One file that a missing link target may have become, and why.
BrokenLinkCandidateFinderConstructorParams The parameters for BrokenLinkCandidateFinder.
BrokenLinkEvidence One reason a file is a candidate for a missing link target.
GitRename A rename recorded in the vault’s git history.
PathMapping The part of a missing path that a candidate replaced: what a “fix all like this” applies to every other link.
Function Description
getParentPath The parent folder of a vault path.
getPathMapping The part of a missing path that a candidate path replaced, found by dropping the path segments they end with in common.
Enum Description
BrokenLinkEvidenceKind The kind of evidence that makes a file a candidate for a missing link target. Candidates list evidence strongest first, in EVIDENCE_KIND_ORDER below.