Skip to content

feat: add no-missing-link-fragments rule #380

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

SwetaTanwar
Copy link
Contributor

@SwetaTanwar SwetaTanwar commented May 19, 2025

Prerequisites checklist

What is the purpose of this pull request?

This PR adds a new rule no-missing-link-fragments to ensure there is no missing link fragment in the markdown

What changes did you make? (Give an overview)

Added the no-missing-link-fragments rule, along with documentation and tests.

Related Issues

fixes #369

Is there anything you'd like reviewers to focus on?

@SwetaTanwar SwetaTanwar marked this pull request as ready for review May 19, 2025 02:20
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this up. This looks like a good start. I have added a few suggestions on documentation & few false postives. I think there are few more cases we should cover that MD051 handles as well:

  1. HTML ids:

    <a id="bookmark"></a>
    
    [Link](#bookmark) // valid
  2. #top: HTML links to #top scroll to the top of a document.

    [Link](#top)
  3. Custom fragment syntax used by GitHub to highlight specific content in a document.

    [Link](#L20) // Valid
    
    [Link](#L19C5-L21C11) // Valid

@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-link-fragments branch from 67f7cc1 to b051c1a Compare May 19, 2025 07:26
@fasttime fasttime added this to Triage May 19, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage May 19, 2025
@snitin315 snitin315 moved this from Needs Triage to Implementing in Triage May 19, 2025
@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-link-fragments branch from 1301dba to a36b406 Compare May 25, 2025 12:03
@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 26, 2025 04:00
@SwetaTanwar SwetaTanwar requested a review from snitin315 May 26, 2025 04:00
@SwetaTanwar SwetaTanwar requested review from lumirlumir and nzakas May 26, 2025 13:48
@nzakas
Copy link
Member

nzakas commented May 27, 2025

@SwetaTanwar please double-check the merge conflict.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like @lumirlumir to review before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

New Rule: link-fragments-should-be-valid
4 participants