follow-md-links.nvim icon indicating copy to clipboard operation
follow-md-links.nvim copied to clipboard

Reference links are not being followed

Open tvanyo opened this issue 1 year ago • 1 comments

Nothing happens when I <cr> on a reference link, such [foobar][1], with [1] defined as [1]: <https://espn.com> later in the doc. Does not matter if the link is a file or a website.

Works fine if I do [foobar](https://espn.com).

Version Info: neovim 0.9.1 treesitter commit d96c216

I have markdown & markdown-inline under ensure_installed in treesitter's setup.

tvanyo avatar Dec 07 '23 22:12 tvanyo

Ok, this is actually happening because of blanks in a file name. What I actually have is:

[Link text 1][1]
[Link text 2][2]

[1]: foo bar.md
[2]: foobar.md

So the link isn't resolved for [1] because of the blank in the filename and this seems to throw off the script to resolve a "valid" filename for [2].

If I wrap the spaced file name in <>, i.e. <foo bar.md> then [1] isn't found because the resolved link is now something like /Users/tvanyo/<foo bar.md>, which doesn't exist, but it doesn't throw off the script and [2] can be resolved.

tvanyo avatar Dec 07 '23 23:12 tvanyo

Implemented by #19

jghauser avatar Feb 11 '24 18:02 jghauser