Add --exclude-link-text=unavailable option?
In some cases, you need to keep a link, even though it is broken, and perhaps add "(unavailable)" to the link text, like this: link text (unavailable).
However, you don't want this known dead link to get checked, so it would be great with an option like --exclude-link=unavailable, which skips links with link texts containing this string. Is this possible?
I think you can already use --exclude-url which accepts a regex? (e.g. I've used --exclude-url=logout to avoid clicking the logout link)
Yes, that works fine. But I want to target the link text, not the link. Perhaps check my example again? :-)
... or do you mean that --exclude-url can also target the link text, not just the URL?
No, you can't target the link text currently, do that would be a prospective new feature.
Thanks for clarifying. Do you think it would be worth considering adding such a feature? A pretty good argument and use case for it, is if you have hundreds of links, which you need to keep as reference, though the target link no longer exist. These links don't need to get checked, and in a sense give false positives.
Possibly, but it fits into the category of filtering, could also support CSS selectors (?) or XPath to capture all scenarios.
Also adding support CSS selectors or XPaths as filters, on top of the link text would expand the flexibility, so that would be nice as well. So something like adding both --exclude-link-text and --exclude-class options?
Yes, you could filter on any link property with --exclude-link="contains(text(), 'Foobar')" or similar.