[GH-ISSUE #443] MD044 flags words in markdown links #2219

Closed
opened 2026-03-07 20:05:41 +03:00 by kerem · 4 comments
Owner

Originally created by @orecham on GitHub (Oct 14, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/443

The new implementation of MD044 is also flagging proper names in links. e.g.

One might want the following capitalization for GPS:

MD044:
  names: [
    'GPS',
    ]

But then, the following would be flagged as an error:

[Link](configuring-the-gps.md)

It looks like the previous version excluded links, which didn't cause this problem: https://github.com/DavidAnson/markdownlint/compare/v0.23.1...v0.24.0#diff-504a7cb2d3155e72bce3746e239ad5d6e4c9836c8e87cf365d0a7a0cb93a6b97L21

Originally created by @orecham on GitHub (Oct 14, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/443 The new implementation of MD044 is also flagging proper names in links. e.g. One might want the following capitalization for GPS: ``` MD044: names: [ 'GPS', ] ``` But then, the following would be flagged as an error: ``` [Link](configuring-the-gps.md) ``` It looks like the previous version excluded links, which didn't cause this problem: https://github.com/DavidAnson/markdownlint/compare/v0.23.1...v0.24.0#diff-504a7cb2d3155e72bce3746e239ad5d6e4c9836c8e87cf365d0a7a0cb93a6b97L21
kerem 2026-03-07 20:05:41 +03:00
Author
Owner

@DavidAnson commented on GitHub (Oct 14, 2021):

Is this a widespread problem, or is it just this one case? I agree that capitalization of proper names in links can be different, but it doesn't have to be. That link could use capital letters or you could add that link text as a proper name (ex: "configuring-the-gps.md"). Some scenarios may want the new behavior, so I'd have to add a parameter to disable it. But if this is very rare, I'd be curious what you think about the two options above.

<!-- gh-comment-id:943490961 --> @DavidAnson commented on GitHub (Oct 14, 2021): Is this a widespread problem, or is it just this one case? I agree that capitalization of proper names in links can be different, but it doesn't have to be. That link could use capital letters or you could add that link text as a proper name (ex: "configuring-the-gps.md"). Some scenarios may want the new behavior, so I'd have to add a parameter to disable it. But if this is very rare, I'd be curious what you think about the two options above.
Author
Owner

@orecham commented on GitHub (Oct 15, 2021):

I've encountered this problem in a MkDocs project which has about 15-20 instances of it.

Since the file names of the articles are used in URLs when the articles are hosted, it's not so ideal to have proper name capitalization. Hyphenated lowercase is more or less the convention for URLs.

Adding the link text as a proper name is a manageable work-around, but leads to a tedious workflow and "feels" hacky IMO. Some kind of parameter (like the existing code_blocks one) would be nicer and give a better user experience.

<!-- gh-comment-id:944067356 --> @orecham commented on GitHub (Oct 15, 2021): I've encountered this problem in a MkDocs project which has about 15-20 instances of it. Since the file names of the articles are used in URLs when the articles are hosted, it's not so ideal to have proper name capitalization. Hyphenated lowercase is more or less the convention for URLs. Adding the link text as a proper name is a manageable work-around, but leads to a tedious workflow and "feels" hacky IMO. Some kind of parameter (like the existing `code_blocks` one) would be nicer and give a better user experience.
Author
Owner

@okalachev commented on GitHub (Nov 16, 2021):

Also #435.

MD044 should not check in links and in HTML, I believe.

<!-- gh-comment-id:970599234 --> @okalachev commented on GitHub (Nov 16, 2021): Also #435. MD044 should not check in links and in HTML, I believe.
Author
Owner

@DavidAnson commented on GitHub (May 2, 2022):

This should have been fixed by github.com/DavidAnson/markdownlint@72543a82e7 for version 0.24.0. For example, the example above does not report a violation.

<!-- gh-comment-id:1114469141 --> @DavidAnson commented on GitHub (May 2, 2022): This should have been fixed by https://github.com/DavidAnson/markdownlint/commit/72543a82e76b46c54c3ac00f6e0a0fa447832ba6 for version `0.24.0`. For example, [the example above does not report a violation](https://dlaa.me/markdownlint/#%25m%23%20Issue%20443%0A%0A%5BLink%5D(configuring-the-gps.md)%0A%0A%3C!--%20markdownlint-configure-file%20%7B%0A%20%20%22proper-names%22%3A%20%7B%0A%20%20%20%20%22names%22%3A%20%5B%0A%20%20%20%20%20%20%22GPS%22%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D%20--%3E%0A).
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#2219
No description provided.