markbind: Improve broken link reporting

MarkBind reports broken intra-site links during the build process (e.g., markbind serve command). Following improvements are suggested (can do in separate PRs):

  • Report each broken link only once (priority.Medium) (d.moderate)
  • Support validating #hashes for <a> tags efficiently (priority.Medium) (d.moderate / high)
  • Provide a way to disable broken link reporting (priority.High)
  • Provide a way to suppress the warning for specific pages or links (priority.Low)
  • Restore broken link reporting for pics (disabled earlier due to #1416) (priority.Low)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

The PR by @yiwen101 seems to have resolved the last of the issues here, thanks again! Closing this for now.

How about:

  • report all broken links at once, at the end, once all pages have finished building (minimize disjointed messages, should be simpler to implement as well)
  • for any given source file, report all its broken links, and the count of broken links only once

Ok! Just to clarify, the desired behaviour should be:

  • A broken link occurs multiple times on the same page (no inclusion) => Report this multiple times, to match the number of fixes required
  • A broken link occurs on a page, which is included in many pages => Report this once, because only one fix is needed (on the original page)

Yes, that’s my current thinking. Other suggestions are welcome too.