filiph / linkcheck

Fast link checker
https://pub.dartlang.org/packages/linkcheck
MIT License
403 stars 51 forks source link

Check destination pages for duplicate anchors #99

Open ascott18 opened 2 years ago

ascott18 commented 2 years ago

It would be nice if this tool could check if the fragment target of a link has multiple matching elements on the destination page. This duplication on the destination is almost always undesirable and unintentional.

e.g.

/page1
<a href="/page2#target /></a>
/page2
<h1 id="target">Target 1</target>
<h1 id="target">Target 2</target>

would generate an error because of multiple id=target in the destination page.