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 rule to enforce links as reference links

See original GitHub issue

As default deactivated. If active, raise error here:

I'm a paragraph with [a link](http://link-to-somewhere)

…but passes this:

I'm a paragraph with [a link][link-to-somewhere]

[link-to-somewhere]: http://link-to-somewhere

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
waldyriouscommented, Aug 25, 2020

It would also be nice if this was configurable by the length of the URL — i.e. non-reference links shorter than N characters would not trigger this rule, with the default max length being 0.

2reactions
leetroutcommented, Aug 31, 2020

CommonMark deviates from this and says it is optional but it is mentioned explicitly in the original Daring Fireball docs:

Then, anywhere in the document, you define your link label like this, on a line by itself:

[id]: http://example.com/ "Optional Title Here"

That is:

Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces); followed by a colon; followed by one or more spaces (or tabs); followed by the URL for the link; optionally followed by a title attribute for the link, enclosed in double or single quotes, or enclosed in parentheses.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Links - Usability & Web Accessibility - Yale University
Hidden Link Text​​ As a general rule, link text alone should be enough to convey the purpose of the link. But, some visual...
Read more >
HTML Anchors: Here's How To Create Links For Fast ...
Learn how to create HTML hyperlinks. This guide covers the anchor element and all of it's attributes.
Read more >
Add rule(s) to enforce certain link rules · Issue #68 - GitHub
Add rules to detect and error when found: No http links,; No links include text from a set of given regexes,; No relative...
Read more >
Create a cross-reference - Microsoft Support
Insert the cross-reference​​ In the Reference type box, click the drop-down list to pick what you want to link to. The list of...
Read more >
<a>: The Anchor element - HTML: HyperText Markup Language
Content within each <a> should indicate the link's destination. ... To create links that open in the user's email program to let them...
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