-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse HTML in order to find anchors (like #tomato
) in the same document
#195
Comments
Revert this once [1] is fixed. [1]: tcort/markdown-link-check#195 Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Revert this once [1] is fixed. [1]: tcort/markdown-link-check#195 Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
This would be nice to have back again. It used to work in 3.8.7 and no longer works in 3.9.3 or 3.10.3. |
Hello! Was curious about the status of this because anchor links are valid markdown but they are all currently broken when checking if links are valid |
@Shocktrooper Steps to reproduce failure
Now update to latest version:
Steps to reproduce correct checking of anchor linksIf the anchor link is defined through Markdown (no use of HTML in Markdown file), then the check works:
|
Oh my apologies my issue is plain anchor links in markdown. Not html |
Perhaps you could give an example of a failing test? Also which version of
|
I am still stuck with using "markdown-link-check": "~3.8.7" due to this regression. Is there any chance of getting it fixed in 3.10.* or later? |
@MikeMcC399 It appears that I had an issue with my syntax that was not apparent and it is not an issue with the tool |
@Shocktrooper would you be able to give an example of what the syntax issue was and how it was fixed? just in case that's what i or others are running into. |
for
and for
The first example was an old and valid way that anchor links worked in an older version of markdown and the second example was just a rename someone forgot I believe |
@MikeMcC399 Sorry to revive an old conversation, but just to be clear, versions 3.8 and prior reported "success" on internal anchor links, but the fact is, it was an unproven positive. Try to change the fragment to any gibberish, and it will pass with flying colours. The solution I see at the moment, until the issue is fixed, is to ignore URLs that consist entirely of fragments. This way they will remain explicitly unchecked, showing up in the report as ignored. |
@jhvhs Shockingly you are correct! 3.8.7A bad anchor link is not detected in 3.8.7. All pass. 3.11.0In version 3.11.0 an anchor link ...
Test setTested with: | Link source | Should | 3.8.7 | 3.11.0 |
| --------------------------- | ------ | -------- | -------- |
| [Good regular link](#link1) | Pass | Pass | Pass |
| [Good link in HTML](#link2) | Pass | Pass | **Fail** |
| [Bad link](#link3) | Fail | **Pass** | Fail |
**Targets**
# link1
<a name='link2'>Link 2</a> Edit: Updated for release 3.11.0 |
Do you have any comments on this thread? |
Has there been any progress on this issue? |
I have created a PR to solve the issue. Rreviews or suggestions for improvement are welcome. |
|
markdown-link-check
doesn't parse HTML, so it can't find#tomato
in your test, but it is something I'm planning on adding.Originally posted by @tcort in #193 (comment)
The text was updated successfully, but these errors were encountered: