GithubHelp home page GithubHelp logo

Comments (3)

DavidAnson avatar DavidAnson commented on July 19, 2024

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:

https://dlaa.me/markdownlint/#%25m%23%20Issue%201080%0A%0A%3C!--%0AComponentStatus%20(and%20ComponentStatusList)%20holds%20the%20cluster%20validation%20info.%0ADeprecated%3A%20This%20API%20is%20deprecated%20in%20v1.19%2B%0A--%3E%0A%0A%5B%2F%2F%5D%3A%20%23%20ComponentStatus%20(and%20ComponentStatusList)%20holds%20the%20cluster%20validation%20info.%0ADeprecated%3A%20This%20API%20is%20deprecated%20in%20v1.19%2B%0A%0A%3C!--%20markdownlint-enable-file%20md013%20--%3E

from markdownlint.

DavidAnson avatar DavidAnson commented on July 19, 2024

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.

ruzickap avatar ruzickap commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.