-
Notifications
You must be signed in to change notification settings - Fork 70
New Rule: link-fragments-should-be-valid #369
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
Comments
I'm 👍🏻 for this rule & I feel this should also be recommended. |
I think this was also discussed & accepted previously in #319 (comment) For the rule name, we can call it |
I think this is a good idea. @SwetaTanwar Are you planning to submit a PR for this? If not, I can take it on. |
Yes, I agree that this rule is worth implementing. However, I’m concerned that it has some tricky aspects. Some Markdown parsers handle heading link fragments in their own ways. For example, one parser might convert The behavior of However, if our goal is to mimic what Personally, I always use Additionally, in general usage, we need to consider that many Markdown parsers support custom link fragments like this: # Heading 1 {#custom-heading-1-it-is-possible-for-many-markdown-parsers} This is commonly used syntax, supported by popular parsers like So in conclusion, it would be great to implement and recommend this rule if we can account for these cases properly. But until we find a concrete way to handle these situations, I think we should hold off on proceeding and have a discussion about how to implement the rule. |
Yes, I will be picking it up |
Maybe I think it's okay for the first version to mimic the Markdownlint rule in order to allow people to easily switch to ESLint. Marking as accepted. |
Uh oh!
There was an error while loading. Please reload this page.
Rule details
This rule should warn when a link fragment does not match any of the fragments that are automatically generated for headings in a document
What type of rule is this?
Warns about a potential problem
Example code
Incorrect Code
Correct Code
Participation
Additional comments
Prior At: Rule
The text was updated successfully, but these errors were encountered: