Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Links to sections that contain inline code in the heading are reported as broken #72

Closed
KStocky opened this issue Jun 27, 2024 · 1 comment · Fixed by #73
Closed
Labels
bug Something isn't working

Comments

@KStocky
Copy link

KStocky commented Jun 27, 2024

Describe the bug

If a section heading contains inline code (e.g. inline code), then links to it report as not valid even though they do work.

To Reproduce
Steps to reproduce the behavior:

  1. Create a section heading in markdown that contains inline code e.g.

This contains inline code

  1. Create a link to that section e.g.
    link

  2. Test that this link does in fact work in vscode or some other markdown viewer

  3. Run linkspector against this markdown file

  4. Observe that linkspector will report this link as broken

Expected behavior

Links to sections that have headings that contain code should be marked as valid when they are.

Additional context

Example actions run - This is an actions run of my repo. It reports that there are 4 broken links but they are all false failures.
First issue - This doc is the first issue being flagged in my action run. Contents 3b is the link that is being reported as broken, but if you click it, it works just fine. This (https://github.com/KStocky/ShaderTestFramework/blob/main/docs/TTL/TypeTraits/VoidT.md#2-detecting-if-an-expression-is-valid-using-ttldeclval) is the URL to that specific section which matches the link used in the document.

@KStocky KStocky added the bug Something isn't working label Jun 27, 2024
@gaurav-nelson
Copy link
Contributor

Thank you @KStocky

Additionally, Linkspector should also correctly check for anchors for headings with link, images, italic and bold text:

### Heading with `inline code`

### Heading with *italic text*

### Heading with **bold text**

### Heading with [a link](https://example.com)

### Heading with ![an image](https://example.com/image.png)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
2 participants