mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #753] [New rule] Link can be simplified to autolink #527
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#527
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Marcono1234 on GitHub (Mar 21, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/753
Problem
Sometimes, maybe due to usage of graphical editors, users write overly verbose inline links and reference links where the link display text is the same as the link destination. For example:
Especially for complex URLs such Markdown code can be difficult to read, and it is error-prone in case only the display text is updated but the link destination is left unchanged and vice versa.
Suggested rule behavior
In these cases markdownlint should suggest usage of autolinks, e.g.
<https://example.com/my-page>. Autolinks make it much easier to read the Markdown code.Corner cases to consider:
@nschonni commented on GitHub (Mar 21, 2023):
Not entirely the same, but the conversion of text to auto links is already covered by md034 autofixing
@tommy-gilligan commented on GitHub (May 27, 2023):
Just for the sake of reference: this seems similar to #399
@DavidAnson commented on GitHub (May 27, 2023):
Agreed!
@DavidAnson commented on GitHub (Nov 12, 2023):
Reopening this issue because #399 is fixed (in
nextbranch), but does not include this behavior. I'm still thinking about whether it should or if this is something different.