-
Notifications
You must be signed in to change notification settings - Fork 13
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
Markdown footnote validation #100
Comments
Try separating footnotes and citations by one line. |
I'm sure this needs a more thorough look from someone familiar with the parser, but a quick check suggests that this behavior is the result of a conflict between how reference links are parsed and how link definitions are parsed. Specifically, link definitions are explicitly not recognized if the reference name starts with a caret. (Note the
Conversely, reference links aren't subject to that exclusion. (Called out here as the "link def".) vscode-markdown-languageservice/src/languageFeatures/documentLinks.ts Lines 295 to 313 in 984eeb7
As a result, footnotes appear to be interpreted as By my read, a fix for this could be as simple as removing |
Just for additional context, even though most people's use case for this is footnotes, the following minimal example is parsed fine by commonmark.js (see here) [^1]
[^1]: /url However, vscode complains with
|
footnotes are often used in rich documentation sites powered by mkdocs and the likes. Would be great to see this fixed a few examples with footnotes that are not captured as a link in the current vscode markdown lsp:
|
Does this issue occur when all extensions are disabled?: Yes/No
Yes
Steps to Reproduce:
(×) No link definition found: '^1' (link.no-such-reference) [Ln 1, Col 6]
The text was updated successfully, but these errors were encountered: