Comments (3)
The content of HTML comments is generally ignored by default. In the case here, MD013 is operating in its default/enabled configuration which reports lines longer than 80 characters as being too long. Unlike some Markdown constructs, HTML comments can be wrapped so this is possible/easy to address. You can read more here: https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md.
The second line you show is not an HTML comment, but a valid link reference definition. It is not reported as being unused because that pattern is specifically ignored. More info on that here: https://github.com/DavidAnson/markdownlint/blob/main/doc/md053.md. But it can be easily wrapped as well.
If you don't like this rule, you can disable it using any of the techniques described in the documentation. But here is your example updated to produce no violations of the line-length rule:
from markdownlint.
Update: The example link reference definition is almost valid. If it is quoted properly, it will not report a length violation even without wrapping:
[//]: # "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+"
from markdownlint.
Thank you for a quick reaction David.
You are right in both cases, but the sentence I use is just example.
My real usecase is:
I have some command (visible to the reader) in markdown and then the command's output which should be hidden for the user (but needs to be preserved for the "technical writer"):
# Issue 1080
This is my command:
```bash
kubectl stern -n cert-manager . --tail 5 --since 1h --no-follow
```
<!--
+ cert-manager-webhook-54f9d96756-8nbqx › cert-manager-webhook
+ cert-manager-777fbdc9f8-qhk2d › cert-manager-controller
+ cert-manager-cainjector-65857fccf8-t68lk › cert-manager-cainjector
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:24.790420 1 reconciler.go:118] "cert-manager: could not find any ca data in data source for target" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.603904 1 reconciler.go:142] "cert-manager: Updated object" kind="mutatingwebhookconfiguration" kind="mutatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.604466 1 reconciler.go:142] "cert-manager: Updated object" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.609019 1 reconciler.go:142] "cert-manager: Updated object" kind="mutatingwebhookconfiguration" kind="mutatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.609755 1 reconciler.go:142] "cert-manager: Updated object" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.254284 1 acme.go:233] "cert-manager/certificaterequests-issuer-acme/sign: certificate issued" resource_name="ingress-cert-staging-tnp9z" resource_namespace="cert-manager" resource_kind="CertificateRequest" resource_version="v1" related_resource_name="ingress-cert-staging-tnp9z-569747980" ...
- cert-manager-cainjector-65857fccf8-t68lk › cert-manager-cainjector
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.254523 1 conditions.go:252] Found status change for CertificateRequest "ingress-cert-staging-tnp9z" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2023-06-24 11:39:26.254515881 +0000 UTC m=+301.629669662
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.309171 1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; please ...
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.322662 1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; please ...
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.331743 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; ...
- cert-manager-777fbdc9f8-qhk2d › cert-manager-controller
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:34:50.197304 1 logs.go:59] http: TLS handshake error from 192.168.113.49:47560: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:34:50.200121 1 logs.go:59] http: TLS handshake error from 192.168.113.49:47572: read tcp 192.168.10.192:10250->192.168.113.49:47572: read: connection reset by peer
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:38:31.687229 1 logs.go:59] http: TLS handshake error from 192.168.113.49:54464: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:39:26.294153 1 logs.go:59] http: TLS handshake error from 192.168.113.49:49836: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:39:26.318155 1 logs.go:59] http: TLS handshake error from 192.168.113.49:49852: EOF
- cert-manager-webhook-54f9d96756-8nbqx › cert-manager-webhook
-->
Anyway - I solved it using <!-- markdownlint-disable -->
like mentioned in Configuration section:
# Issue 1080
This is my command:
```bash
kubectl stern -n cert-manager . --tail 5 --since 1h --no-follow
```
<!-- markdownlint-disable -->
<!--
Many very long lines...
-->
<!-- markdownlint-restore -->
Thank you for a quick response...
from markdownlint.
Related Issues (20)
- MD007 when MD010 disabled HOT 5
- MD040: Add disallowed_languages HOT 2
- MD051 false positives for section titles with image in them HOT 2
- How to configure MD012 HOT 3
- Provide custom rules with other rule configurations HOT 2
- MD036 triggered right before a header HOT 1
- Set global defaults HOT 1
- [DEP0040] DeprecationWarning - punycode module is deprecated HOT 7
- New Table formatting rule HOT 4
- False positive with link-image-style rule (MD054) and `{ url_inline: false }` HOT 2
- MD003 "consistent" doesn't allow "setext_with_atx" HOT 3
- MD049, MD050 conflicts with functional differences between underscores and asterisks HOT 5
- IntelliJ plugin HOT 1
- endlessschoes08
- MD030: incorrectly firing inside HTML comments that end with `--->` after switch to micromark HOT 3
- (MD033 - Inline HTML)
- SRockt HOT 1
- MD044: Proper name matched in Hugo-style relref links HOT 7
- MD025 Multiple top-level headings with`title` frontmatter HOT 1
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.