markdownlint
markdownlint copied to clipboard
New rule: link simplification
A link like this [https://github.com](https://github.com) can be easily simplified to <https://github.com>.
This way it's less code duplication and it is easier to read.
@DavidAnson could you please give me an example of the PR or commit, which adds a new feature similar to this one? I will try to implement it, though I don't know Node.js at all (so it will take some time).
Here is the most recent one: https://github.com/DavidAnson/markdownlint/pull/224
There is a complicating factor here that there is a collection of link-related rule requests I would ultimately like to bundle into one rule. I do not blame you if you do not want to wade into that, but if you do I will probably be a little pickier than usual. Fair warning. :)
Thanks for the warning 😂 I will take a look at what I can do.
For anyone looking to implement this, #753 contains a bit additional information and corner cases to consider.
@DavidAnson, will this be fixed by the new rule MD054?
Though if I see it correctly, that new rule is only about allowing / disallowing certain link styles. But if I understand the author of this issue here correctly, the suggestion was to enforce a link style (autolink) depending on the link content, and not generally.
Or will that be tracked in #753 in the future? (technically that issue is a duplicate of this one here, but it covers more cases, including reference links)
Agree this is more like 753. I expect to push changes that implement that tonight.