follow-md-links.nvim
follow-md-links.nvim copied to clipboard
Filenames with whitespace support
To address issues #3 and #18, I've made a change to allow whitespace in path or filenames in reference links.
To achieve this, the links with whitspace need to be wrapped in < >
. For example:
[ref link 1][1]
[ref link 2][2]
[1]: ./file_without_space.md
[2]. <./file with space.md>
The link ./file_without_space.md
should also be written as <./file_without_space.md>
without an issue. The PR strips the <>
after the iter_match
call, which seems to be the source of the problem.
It turns out that the angle bracket is required to allow whitespace. This is because treesitter-markdown supports the GitHub Flavored Markdown and, per example 164 of the GFM spec, spaces in link destinations require the angle bracket.
So this is the valid, not kludged, fix for this issue.
Thank you! And sorry this has taken me forever to get to! <3