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.

Add lint for a link reference without a corresponding link definition (or vice versa)

See original GitHub issue

Often (especially when refactoring) links using the definition/reference style will get broken. It would be useful for markdownlint to catch this.

Two examples are:

Link Ref without Def

See [Docs][] for more info.

<!-- Should have a link definition below like:
[docs]: https://example.com
-->

Link Def without Ref

See [New Docs][] for more info.

<!-- None of the link definitions match the link reference above. -->
[docs]: https://example.com

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidAnsoncommented, Jun 2, 2022

Two new rules will be available in the next release of the library:

They will report errors for:

  • Link and image references missing a label
  • Link/image reference definitions that are unused
  • Link/image reference definitions that are duplicated

The latter two scenarios can be automatically fixed by the library (by deleting the unneeded reference definition).

/cc @jasonsnell

0reactions
DavidAnsoncommented, Jun 22, 2022

@jasonsnell Cool. If there’s anything ya’ll think I should be doing here to make it more compelling (other than adding more rules), please let me know.

For example: editor integration. I happen to think the VS Code integration is pretty good (because I wrote it), but maybe you have a different favorite editor.

https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown Linter - Adding Link Reference Definitions
The main difference between the two elements is that a link reference definition does not add any elements into the HTML document by...
Read more >
TSConfig Reference - Docs on every TSConfig option
Lets you set a base directory to resolve non-absolute module names. You can define a root folder where you can do absolute file...
Read more >
Learning HTML 3.2 by Examples - Computer Science
An extensive guide to writing HTML 3.2 documents, with examples and practical advice.
Read more >
Android Lint Checks - Android Studio Project Site
http://developer.android.com/reference/android/widget/AdapterView.html ... example,you can add a .debug package suffix in one version and not the other.
Read more >
Router - Angular
A service that provides navigation among views and URL manipulation capabilities. ... the Router will trigger a forward navigation and vice versa.
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