feat: improve errors message to distinguish between file system and fragment errors

This commit is contained in:
2023-06-27 13:15:03 +02:00
parent 6c4e8cec9c
commit a33c682974
4 changed files with 18 additions and 11 deletions

View File

@ -21,7 +21,7 @@
**markdownlint-rule-relative-links** is a [markdownlint](https://github.com/DavidAnson/markdownlint) custom rule to validate relative links.
It ensures that relative links (using `file:` protocol) are working and not "dead" which means that it exists in the file system of the project that uses [markdownlint](https://github.com/DavidAnson/markdownlint).
It ensures that relative links (using `file:` protocol) are working and exists in the file system of the project that uses [markdownlint](https://github.com/DavidAnson/markdownlint).
### Example
@ -37,13 +37,13 @@ With `awesome.md` content:
```md
[abc](./abc.txt)
[Dead link](./dead.txt)
[Invalid link](./invalid.txt)
```
Running [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) with `markdownlint-rule-relative-links` will output:
```sh
awesome.md:3 relative-links Relative links should be valid [Link "./dead.txt" is dead]
awesome.md:3 relative-links Relative links should be valid [Link "./invalid.txt" should exist in the file system]
```
### Related links