question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MD053 should support "[//]: # (Comment)" pattern by default

See original GitHub issue

This seems to be a regression introduced by v0.32.1 release which affects people using markdown comments as recommended here, which is hugely popular, with almost 2k upvotes. We used the format below in order to add some placeholder comments which are needed when we compile the documentation, so we know were a specific section starts or ends.

[//]: # DO-NOT-REMOVE-README-TITLE

This worked fine until yesterday, when pre-commit monthly update upgraded markdownlint to v0.32.1.

README.md:3:1 MD053/link-image-reference-definitions Link and image reference definitions should be needed [Unused link or image reference definition: "//"] [Context: "[//]: # DO-NOT-REMOVE-README-T..."]

Is there any workaround for this?

PS. Even a search on https://sourcegraph.com/search?q=context:global+[//]:+%23&patternType=literal can show that use of this is extremely popular.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidAnsoncommented, Aug 2, 2022

Agreed. I am thinking I will add a configurable list of “unused” referenced labels to ignore and default it to just the “//” case you highlight as that seems to have gained traction with the community.

0reactions
DavidAnsoncommented, Aug 9, 2022

I published version 0.26.2 of the library last night and here is an example of your scenario not reporting an error: https://dlaa.me/markdownlint/#%25m%23 Issue 545 [%2F%2F]%3A %23 DO-NOT-REMOVE-README-TITLE

Dependent project like CLI and CLI2 will pick up pick up the change soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

markdownlint/Rules.md at main - GitHub
A Node.js style checker and lint tool for Markdown/CommonMark files. - markdownlint/Rules.md at main · DavidAnson/markdownlint.
Read more >
Markdownlint - Visual Studio Marketplace
Extension for Visual Studio Code - Markdown linting and style checking for Visual Studio Code.
Read more >
SDK development guide - Countly
Note: count value defaults to 1 internally if not specified. Internal Events. The call for recording events should support recording Countly ...
Read more >
How do I change Markdownlint settings in Visual Studio Code
The trick is explained in the vscode-markdownlint repo (diff from the primary markdownlint repo):. Rules can also be configured using Code's ...
Read more >
David Anson (@DavidAns) / Twitter
If people expect developers to analyze the pedigree of every line of code that gets added for them, I think they will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found