DavidAnson / markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.
MIT License
4.86k stars 738 forks source link

Link validation triggers when PANDOC links refer to Zotero citations #534

Closed elonden closed 2 years ago

elonden commented 2 years ago

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

DavidAnson commented 2 years ago

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.

elonden commented 2 years ago

Hello David,

This is the trigger I get:

image

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

DavidAnson commented 2 years ago

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

elonden commented 2 years ago

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