Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link label with ^ not recognized #792

Closed
villeodell opened this issue Apr 24, 2023 · 2 comments
Closed

Link label with ^ not recognized #792

villeodell opened this issue Apr 24, 2023 · 2 comments
Labels

Comments

@villeodell
Copy link

From https://spec.commonmark.org/0.30/#link-label:

A link label begins with a left bracket ([) and ends with the first right bracket (]) that is not backslash-escaped. Between these brackets there must be at least one character that is not a space, tab, or line ending. Unescaped square bracket characters are not allowed inside the opening and closing square brackets of link labels. A link label can have at most 999 characters inside the square brackets.

One label matches another just in case their normalized forms are equal. To normalize a label, strip off the opening and closing brackets, perform the Unicode case fold, strip leading and trailing spaces, tabs, and line endings, and collapse consecutive internal spaces, tabs, and line endings to a single space. If there are multiple matching reference link definitions, the one that comes first in the document is used. (It is desirable in such cases to emit a warning.)

The following example is parsed by commonmark.js (see here)

[^1]

[^1]: /url

However, markdownlint complains with

No link definition found: '^1'(link.no-such-reference)

In addition to the above reason for supporting, support for these types of link labels would also be a particular help for users of footnotes.

@villeodell
Copy link
Author

villeodell commented Apr 24, 2023

My apologies! I thought this was markdownlint complaining, when in fact it's actually vscode 🙄 .

DavidAnson/vscode-markdownlint#262

microsoft/vscode-markdown-languageservice#100

@DavidAnson
Copy link
Owner

No worries! I hope they fix this soon. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants