Munter / hyperlink

A node library and command line tool to test the integrity of your internal an external hyperlinks
231 stars 24 forks source link

Feature/handle GitHub readme fragments #159

Closed Munter closed 5 years ago

Munter commented 5 years ago

Github does a weird rewrite of heading fragments where they have a slugified link to a fragment that represents the user content, but the corresponding id-attribute has a prepended user-content-, which they then figure out how to navigate to with javascript.

<a id="user-content-6-test262-status" class="anchor" aria-hidden="true" href="#6-test262-status">

This caused problems with hyperlinks fragment check. Hyperlink now re-tries checking the fragment with the prepended string if the content is on github.com