linkcheck
linkcheck copied to clipboard
[BUG] Anchors are not checked after following redirects
Hi! I would expect that, when running with --check-anchors --show-redirects
, linkcheck would emit a warning if a page has a redirect and the destination lacks the anchor (ex. a#b
redirects to c
, but b
is not an anchor on c
).
That doesn't seem to be the case.
Do we agree that this is a bug? I've seen you're swamped @filiph , and I'm happy to attempt to fix this given some starting pointers :)
Hi @stefano-ottolenghi, thanks for the issue and yes, I'd be happy for a pull request.
I'm guessing you want to start somewhere here: https://github.com/filiph/linkcheck/blob/master/lib/src/parsers/html.dart#L100-L106
If I were you, I'd add a new test case first: https://github.com/filiph/linkcheck/tree/master/test, and try to fix it.