Comments (8)
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)
from markdownlint.
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:
<a href="..." style="something">...</a>
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!
from markdownlint.
No, I didn't mean inline HTML. Some examples to clarify:
Good:
Lorem ipsum dolor sit amet, [consectetur adipiscing] elit. Etiam lectus dui, laoreet eget mauris eget, interdum blandit risus. Vestibulum ac ornare dolor, et tincidunt nulla. Suspendisse vitae dolor nec ipsum vehicula varius non et diam. Vivamus finibus libero sed tincidunt accumsan. Aliquam erat volutpat. Donec faucibus, neque ac semper blandit, est lacus placerat purus, a blandit magna diam et lorem. Maecenas tincidunt iaculis eleifend. In bibendum elementum ex, sit amet pharetra est efficitur at.
[consectetur adipiscing]: http://example.com
Bad, if not Allow all inline-style links
is set:
Lorem ipsum dolor sit amet, [consectetur adipiscing](http://example.com) elit. Etiam lectus dui, laoreet eget mauris eget, interdum blandit risus. Vestibulum ac ornare dolor, et tincidunt nulla. Suspendisse vitae dolor nec ipsum vehicula varius non et diam. Vivamus finibus libero sed tincidunt accumsan. Aliquam erat volutpat. Donec faucibus, neque ac semper blandit, est lacus placerat purus, a blandit magna diam et lorem. Maecenas tincidunt iaculis eleifend. In bibendum elementum ex, sit amet pharetra est efficitur at.
Good, if Allow inline-style links in lists
is set:
* [Google](https://google.com)
* [Bing](https://bing.com)
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 :)
from markdownlint.
Makes perfect sense, thank you!
from markdownlint.
For completeness, an option to disallow reference links would be nice, and/or a "consistent" option, ala ul-style.
from markdownlint.
Re-adding comment from #321, which was closed as a duplicate:
It would also be nice if this was configurable by the length of the URL — i.e. non-reference links shorter than N characters would not trigger this rule, with the default max length being 0.
from markdownlint.
Should autolinks be allowed?
from markdownlint.
Should autolinks be allowed?
Tentatitve decision: Autolinks should be ignored
Allow inline-style links in lists only
Another possible criteria for which link style to use: whether or not the link destination is relative
It would also be nice if this was configurable by the length of the URL — i.e. non-reference links shorter than N characters would not trigger this rule, with the default max length being 0.
Tentatitve decision: All of these should be configurable but it is not clear to me what that should look like in the schema.
from markdownlint.
Related Issues (20)
- No bare-urls when using _redirects file HOT 1
- MD033 - Inline HTML Not ignoring custom HTML tags, but recognizing them as tags HOT 2
- MD033: Organizing information with collapsed sections HOT 7
- MD045: no-alt-text triggered even though html alt-text is specified HOT 2
- QUESTION: Is it possible to write custom linting rules, including Quick Fix information, for frontmatter? HOT 2
- Copyright HOT 1
- MD056/table-column-count counts pipes inside backticks as column separators HOT 2
- MD014 only considers the `$` sign, is this intentional? HOT 2
- Umlauts like Ä, Ö, Ü in Mailadresses/URLs are not detected as normal letters HOT 5
- HTML disable/enables comments triggered when inside Markdown inline code HOT 4
- Frontmatter interpreted as top-level heading HOT 8
- `markdownlint-disable-next-line` should apply to the next non-empty line HOT 1
- MD045 shown when image has alt text in the optional title HOT 3
- MD029/ol-prefix: Continuous list with more than 10 elements HOT 1
- Include additional schema/types for strict rule name verification HOT 2
- Diabling rules from the front matter? HOT 2
- 11 12 14 16 HOT 3
- Reference links are lost between dollar signs HOT 7
- Feature Request: Recognize `markdownlint-*` configuration comments in "non-HTML comments" (unused link reference definitions) HOT 1
- MD036: doesn't fire when any HTML comment is present on the same line.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownlint.