tcort / markdown-link-extractor

extracts links from markdown texts
ISC License
23 stars 19 forks source link

Reintroduce anchor detection as configurable step #25

Closed aepfli closed 6 months ago

aepfli commented 1 year ago

Note: this is just a suggestion as I stumbled upon this and thought this is a suitable contribution. It is hard to grasp why anchor detection was removed, but this unites both worlds, at least.

Anchor detection got removed during refactoring, as a link will still point to a sufficient URL with a broken anchor. It still generates wrong/broken links, especially when markdown is used to generate pages that are checked with tools like HTMLtest, which verify proper anchors etc.

So, I reintroduce this change with this pr but as a configurable option. This should still allow the proper outcome of the refactoring but ensures backward compatibility for other users who rely on proper anchor handling.

Relates: #24

Signed-off-by: Simon Schrottner simon.schrottner@dynatrace.com

aepfli commented 1 year ago

If this is a desirable change, I can also provide an update for https://github.com/tcort/markdown-link-check

aepfli commented 1 year ago

seems like https://github.com/tcort/markdown-link-check/issues/212 would be solved by this

matthandus commented 5 months ago

Hi @tcort , can we have a new release that includes this PR to support anchor detection again? Thank you for this awesome project!