Custom rule for markdownlint to validate relative links.
## 📜 About **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 exists in the file system of the project that uses [markdownlint](https://github.com/DavidAnson/markdownlint). ### Example File structure: ```txt ├── abc.txt └── awesome.md ``` With `awesome.md` content: ```md [abc](./abc.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 ["./invalid.txt" should exist in the file system] ``` ### Additional features - Support images (e.g: ``). - Support links fragments similar to the [built-in `markdownlint` rule - MD051](https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md) (e.g: `[Link](./awesome.md#heading)`). - Ignore external links and absolute paths as it only checks relative links (e.g: `https://example.com/` or `/absolute/path.png`). ### Limitations - Only images and links defined using markdown syntax are validated, html syntax is ignored (e.g: `` or `