follow-md-links.nvim
follow-md-links.nvim copied to clipboard
Reference links are not being followed
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.
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.
Implemented by #19