Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements URL fragment checking. Parsing is expanded to also collect values of all `id` attributes. For missing fragments in files a `CheckError::Anchor` will be returned containing a path and the missing fragment. In Rust documentation non-existent fragments in the form of `#n-m` is used to highlight a range of lines in the source code. For fragments in that form additional check is performed to test if all fragments `n` through `m` exist. In case of missing items in a ranged fragment `CheckError::AnchorRange` will be returned containing a path, the missing ranged fragment, and missing item from the range. Bare in mind that this introduces overhead of performing n+1 parsing or fetching via HTTP. This is because multiple links pointing to the same URL with different fragments end up fetching/parsing the same content for each fragment. To help with that fragment caching is using memoization using cached crate. Fixes #7
- Loading branch information