mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #40] Add rule to check for inline-style links #32
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#32
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 @pascalberger on GitHub (Jan 10, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/40
A rule to dissallow inline-style links would be a nice enhancements.
Possible configuration parameters:
@DavidAnson commented on GitHub (Jan 11, 2017):
Can you please give some examples to be sure I understand the request? I searched "for inline-style" links and it suggests something like the following:
If so, does rule MD033 Inline HTML help? It can be used to block HTML content which should cover the first of your three scenarios.
Also, why are lists special with regard to inline-style links? Would blockquotes deserve similar treatment? Tables? Just lists?
Thanks for the clarification!
@pascalberger commented on GitHub (Jan 11, 2017):
No, I didn't mean inline HTML. Some examples to clarify:
Good:
Bad, if not
Allow all inline-style linksis set:Good, if
Allow inline-style links in listsis set:The general idea behind the rule would be that inline-style links makes the Markdown source file harder to read. The exception for lists is that IMHO if you make a list of just links, it's easier to read if using inline-style than reference-style links, since the link is the whole content there. More precise this exception should only be valid if there is no additional text in the list, but don't know if this is possible :)
@DavidAnson commented on GitHub (Jan 11, 2017):
Makes perfect sense, thank you!
@bhrutledge commented on GitHub (Nov 24, 2019):
For completeness, an option to disallow reference links would be nice, and/or a "consistent" option, ala ul-style.
@waldyrious commented on GitHub (Oct 8, 2022):
Re-adding comment from #321, which was closed as a duplicate:
@tommy-gilligan commented on GitHub (May 30, 2023):
Another possible criteria for which link style to use: whether or not the link destination is relative
eg.
[read destination docs](./destination/README.md)vs
[read destination docs](https://example.com/destination)@tommy-gilligan commented on GitHub (May 30, 2023):
Should autolinks be allowed?
@tommy-gilligan commented on GitHub (May 31, 2023):
Tentatitve decision: Autolinks should be ignored
Tentatitve decision: All of these should be configurable but it is not clear to me what that should look like in the schema.