markdownlint icon indicating copy to clipboard operation
markdownlint copied to clipboard

Link validation triggers when PANDOC links refer to Zotero citations

Open elonden opened this issue 4 years ago • 4 comments

When I insert a link definition like [@abc123] pandoc will look in my Zotero citation reference (bibtex) and insert a reference number pointing to a link at the end of my document.

Markdownlint does flag this as an error and mentions "no link definition found". As there is no MD number associated I can't exclude it. At least I haven't found a way to do this..

Any ideas would be much appreciated.

Regards Erwin

elonden avatar Jun 28 '22 05:06 elonden

I'm not familiar with Zotero or bibtex, neither is part of the CommonMark specification as far as I know. You probably want to disable the relevant rule for your project, it sounds like MD052/reference-links-images, but the name can be found in the error you are getting.

DavidAnson avatar Jun 28 '22 05:06 DavidAnson

Hello David,

This is the trigger I get:

image

It doesn't show an MD number so I'm a bit in limbo here.

elonden avatar Jun 28 '22 05:06 elonden

I don't think that error is coming from a built-in markdownlint rule:

  1. The new rule is not yet available in the VS Code extension
  2. The message from MD052 is worded differently: https://github.com/DavidAnson/markdownlint/blob/51cec76c2b0e585a290aec4b53201c517e53d901/lib/md052.js#L27

I think you may be seeing new VS Code behavior: https://code.visualstudio.com/updates/v1_68#_markdown-link-validation

DavidAnson avatar Jun 28 '22 06:06 DavidAnson

David, you are correct. A while ago I enabled the internal vscode experimental markdown validation. This is where that warning message came from. As I referenced these links somewhat differently before I did not notice this.

image

Now I've set this to ignore and things look a lot better.. :-)

Sorry for bothering. Maybe it'll help someone though...

Regards Erwin

elonden avatar Jun 28 '22 06:06 elonden