Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD044 flags words in markdown links #443

Closed
orecham opened this issue Oct 14, 2021 · 4 comments
Closed

MD044 flags words in markdown links #443

orecham opened this issue Oct 14, 2021 · 4 comments

Comments

@orecham
Copy link

orecham commented Oct 14, 2021

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: v0.23.1...v0.24.0#diff-504a7cb2d3155e72bce3746e239ad5d6e4c9836c8e87cf365d0a7a0cb93a6b97L21

@DavidAnson
Copy link
Owner

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.

@orecham
Copy link
Author

orecham commented 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.

@okalachev
Copy link

Also #435.

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

@DavidAnson
Copy link
Owner

This should have been fixed by 72543a8 for version 0.24.0. For example, the example above does not report a violation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants