Skip to content
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

Title Links Not Working in 1.0.14 #176

Closed
niall-byrne opened this issue Feb 25, 2023 · 7 comments
Closed

Title Links Not Working in 1.0.14 #176

niall-byrne opened this issue Feb 25, 2023 · 7 comments
Labels
markdown-link-check Related to the underlying markdown-link-check library

Comments

@niall-byrne
Copy link

niall-byrne commented Feb 25, 2023

In the latest release, I notice links to title sections are now marked as broken.
ie.

[Dependencies](#Dependencies)

# Dependencies
This markdown example has no dependencies.

I can work around this with configuration, but I wanted to check if this was the desired behaviour?

@niall-byrne niall-byrne changed the title Title Links Not Working in v14 Title Links Not Working in 1.0.14 Feb 25, 2023
@gaurav-nelson
Copy link
Owner

Thank you @niall-byrne, Can you verify this with v1.0.15 ?

@philrz
Copy link

philrz commented Mar 7, 2023

@gaurav-nelson: I can confirm this does indeed happen with v1.0.15. After seeing my prior issue #170 was fixed in v1.0.15, I went to point at that version in my production config only to find the linkchecks of anchor links like these were broken, so that's when I searched & found this issue. I've just reproduced it in my test repo https://github.com/philrz/linkcheck: The check for [Dependencies](#Dependencies) passed ok when I had it pointing @v1 but it fails when pointing @1.0.15. I notice that @niall-byrne's paste shows what looks to be incorrect syntax [Dependencies][#Dependencies] (two sets of square brackets) but I have it failing with [Dependencies](#Dependencies).

@gaurav-nelson
Copy link
Owner

gaurav-nelson commented Mar 8, 2023

@philrz I think the correct markdown anchor should be:

[Dependencies][#dependencies]
...
...
# Dependencies
This markdown example has no dependencies.

Because href is always generated like that (d vs D). Its working fine on GitHub because they maybe using some scripts.

Can you recheck with this change?

@philrz
Copy link

philrz commented Mar 8, 2023

@gaurav-nelson: Ah yes, thanks for spotting the importance of the capitalization. I did the proposed recheck and indeed now that it's a lowercase d the checker @1.0.15 is passing with that test README. So, that's great!

However, I've still got a problem with my production markdown, and unfortunately it doesn't seem to be a problem with capitalization. I've copied the markdown into my test repo at https://github.com/philrz/linkcheck/blob/main/zng.md if you're up for taking a look. The output of the Actions run with verbose mode enabled shows:

FILE: ./zng.md
  [✓] https://avro.apache.org/ → Status: 200
  [✓] https://en.wikipedia.org/wiki/Apache_Parquet → Status: 200
  [✓] https://developers.google.com/protocol-buffers → Status: 200
  [✓] https://kafka.apache.org/ → Status: 200
  [✓] #21-types-frame → Status: 200
  [✖] #22-values-frame → Status: 404
  [✖] #23-control-frame → Status: 404

  7 links checked.

  ERROR: 2 dead links found!
  [✖] #22-values-frame → Status: 404
  [✖] #23-control-frame → Status: 404```

What's strange is that if you look in the doc you'll see these links all appear right next to each other:

* [types frame](#21-types-frame),
* [values frame](#22-values-frame), or
* [control frame](#23-control-frame).

And the section headers for each are:

### 2.1 Types Frame
### 2.2 Values Frame
### 2.3 Control Frame

And for some reason it thought the Types Frame one was ok but the other two were a 404, but I can't for the life of me see why they're treated differently. I'd appreciate any insight you might have. Thanks!

@gaurav-nelson gaurav-nelson added the markdown-link-check Related to the underlying markdown-link-check library label Mar 24, 2023
@gaurav-nelson
Copy link
Owner

gaurav-nelson commented Mar 24, 2023

Thank you @philrz I ran through that file locally with markdown-link-check and got the same result. I'm not sure what is wrong here, but this issue is with the underlying markdown-link-check library and not the GitHub action. I suggest to close this one and create an issue at https://github.com/tcort/markdown-link-check/issues

@philrz
Copy link

philrz commented Mar 27, 2023

Thanks @gaurav-nelson. I've opened tcort/markdown-link-check#250. Will see what they say.

@niall-byrne
Copy link
Author

I'll close this issue given the upstream library is being investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
markdown-link-check Related to the underlying markdown-link-check library
Projects
None yet
Development

No branches or pull requests

3 participants