Skip to content

Commit

Permalink
linkchecker: Fix bug where fragment errors printed the wrong path.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 9, 2021
1 parent dbc8a1c commit 1e9f0b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ impl Checker {
} else {
report.errors += 1;
print!("{}:{}: broken link fragment ", pretty_path, i + 1);
println!("`#{}` pointing to `{}`", fragment, pretty_path);
println!("`#{}` pointing to `{}`", fragment, target_pretty_path);
};
}
});
Expand Down
3 changes: 2 additions & 1 deletion src/tools/linkchecker/tests/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ fn broken_fragment_local() {
fn broken_fragment_remote() {
broken_test(
"broken_fragment_remote/inner",
"foo.html:3: broken link fragment `#somefrag` pointing to `foo.html`",
"foo.html:3: broken link fragment `#somefrag` pointing to \
`[..]/broken_fragment_remote/bar.html`",
);
}

Expand Down

0 comments on commit 1e9f0b3

Please sign in to comment.