-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description
Currently, the rule doesn't report an error for the following:
├── file1.md
└── file2.md
With file1.md
content:
## Existing Heading
With file2.md
content:
[Link](./file1.md#ExistIng-Heading)
Whereas, we should report an error, to enforce consistency with the built-in markdownlint
rule - MD051.
More explanations there: DavidAnson/markdownlint#1117 (comment)
Describe the solution you'd like
The rule should reports an error, saying that it's an invalid link fragment, as with the above example, the link should have been: [Link](./file1.md#existing-heading)
.
There is a test fixture to ensures that we don't consider as errors, the links fragments with mixed casing: https://github.com/theoludwig/markdownlint-rule-relative-links/tree/develop/test/fixtures/valid/existing-heading-case-insensitive, we should instead move it to "invalid", and make the test pass. However, this change should be considered as a BREAKING CHANGE.
Describe alternatives you've considered
Continue to consider heading links fragments valid even if the link fragment is not only in lowercase, with mixed case for example.