[GH-ISSUE #213] Proposal: Detect names in inline-links #183

Open
opened 2026-03-03 01:24:28 +03:00 by kerem · 0 comments
Owner

Originally created by @lorenzleutgeb on GitHub (Aug 19, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/213

Suppose I want to reference/link something by name, but am doing it wrong, because I forget that I should use [/] braces instead of (/) braces:

See [this](name).

[name]: https://example.com/name

Where the correct version is:

See [this][name].

[name]: https://example.com/name

and the diff between wrong and correct version is

1c1
< See [this](name).
---
> See [this][name].

Markdownlint should index all names of references, and then, for all inline links, check that they are not referring to a name. In the above case I would like to see a warning along the lines of:

example.md: 1: MDXXX/inline-names Inline link uses reference name as URL. Don't forget to use `[...]` instead of `(...)` with named references.

Somewhat related to other link-sanitizing proposals, like #144

Originally created by @lorenzleutgeb on GitHub (Aug 19, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/213 Suppose I want to reference/link something by name, but am doing it wrong, because I forget that I should use `[`/`]` braces instead of `(`/`)` braces: ```markdown See [this](name). [name]: https://example.com/name ``` Where the correct version is: ```markdown See [this][name]. [name]: https://example.com/name ``` and the diff between wrong and correct version is ```diff 1c1 < See [this](name). --- > See [this][name]. ``` --- Markdownlint should index all names of references, and then, for all inline links, check that they are not referring to a name. In the above case I would like to see a warning along the lines of: ``` example.md: 1: MDXXX/inline-names Inline link uses reference name as URL. Don't forget to use `[...]` instead of `(...)` with named references. ``` --- Somewhat related to other link-sanitizing proposals, like #144
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#183
No description provided.