Comments (3)
Link text is usually meant to be descriptive, so I think the current behavior is a sensible default. But your scenario makes sense as well, so I would be inclined to add an option to exempt link text from this rule to enable it. Would that work?
from markdownlint.
That would work for me yeah in this case.
However I still couldn't write "the domain name of GitHub is github.com" anywhere without getting an error, so I wonder if we could handle this in a more generic way. If I do have both "github.com"
and "GitHub"
in my configuration, what is the expected behavior? Does the order matter?
What I've been writing documentation for a my vue-webpack project template and I noticed that I wanted to do the following:
- Vue should be written with a capital V
- Vue.js should also be written with a capital V
vue.js
as a file name should be written with lowercase if that's what the file is called. Not a problem since I use code blocks for file names and those are exempt, and there wouldn't be any way for the linter to tell the difference anyhow.- Vuex is the name of a separate library which should be written with a capital V. Not a problem, linter doesn't give false positives.
- But vue-router is also a separate library, which should be written with a lowercase v. I get an error from the linter even if I have
"vue-router"
or"vue-"
in my configuration in addition to"Vue"
. This makes sense if I think about the implementation (dash is a punctuation character), but I think it's actually a common use case (for example many plugins for ESLint have all lowercase names with the string-eslint-
included) and there should be a way to handle this.
I worked around this issue by enclosing all names that look like this in code blocks, which is fine (ish) for me, but they're not all package names and the same issue comes up with other stylised names or domain names used outside of link texts.
There's probably way more complexity in here that makes sense to try to tackle with this feature of a simple linter, but anyways it's interesting to consider. Perhaps there's an easy solution here somewhere that might involve checking if a string is whitelisted in the config before the linter warns about it, whitelisting all URL patterns or something else.
from markdownlint.
Interesting scenario! Order should not matter, so I don't think that will help you. I'll create a test file from your examples above and play around with it soon. Some ideas I'll explore are exempting link text and treating period/hyphen as part of the word. I'd rather not support regular expressions, but that may be something else to consider. Thanks again, please let me know if there are other tricky scenarios here!
from markdownlint.
Related Issues (20)
- 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 7
- `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.
- MD018 error for ID selectors in inline CSS
- MD051 incorrectly expects lower cased fragment HOT 1
- Link fragments shows warning MD051 when target is preceeded by emoji. HOT 2
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.