Skip to content

Clarify what the word "link" means #478

@aidantwoods

Description

@aidantwoods

Splitting this from #476

There appears to be a discrepancy in meaning when using the word "link".

Autolinks are absolute URIs and email addresses inside < and >. They are parsed as links, with the URL or email address as the link label.

Does the use of the words "link" and "links" correspond to HTML element <a>, or the definition (*)?

(*)

A link contains link text (the visible text), a link destination (the URI that is the link destination), and optionally a link title. There are two basic kinds of links in Markdown. In inline links the destination and title are given immediately after the link text. In reference links the destination and title are defined elsewhere in the document.

From the definition, it would appear that this particular definition only applies to inline links and reference links. However this section is not linked to when used

e.g. in the definition for link text

Links may not contain other links, at any level of nesting. If multiple otherwise valid link definitions appear nested inside each other, the inner-most definition is used.

To repeat the initial question: Does the use of the words "link" and "links" correspond to HTML element <a>, or the definition (*)?

Which leads to another question: Can link text contain an autolink?

The definition of an autolink states that it is a "link" in the same way that link text states that it may not contain any "links".


For the purposes of demonstrating how this ambiguity may be resolved (and generally because it would be incomprehensible otherwise), I have used emphasis in the above to indicate when a word holds a definition defined in the CommonMark document. However in blockquotes, hyperlinks have been preserved from the document and no words are emphasised for the purpose of accuracy to the original text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions