[x] I have read all the tree-sitter docs if it relates to using the parser
[x] I have searched the existing issues
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
The destination in an inline link can be enclosed in angle braces, so the link can include whitespace. According to the spec, the angle braces do not belong to the link destination:
a sequence of zero or more characters between an opening < and a closing > that contains no line endings or unescaped < or > characters
It also makes semantic sense, that what ever is parsed as link_destination can be used as a file path or url. This is also the context this came up in, because neovim tries to open the url with the angle braces (see https://github.com/nvim-treesitter/nvim-treesitter/issues/7369).
I have a crude fix ready and will submit a pull request once I wrote a test, if you agree that this should be changed.
Actually I have no idea how to create additional tests for this, as far as I understand tests do not support ranges or anonymous nodes. Let me know if there is a way I am not seeing.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
The destination in an inline link can be enclosed in angle braces, so the link can include whitespace. According to the spec, the angle braces do not belong to the link destination:
It also makes semantic sense, that what ever is parsed as
link_destination
can be used as a file path or url. This is also the context this came up in, because neovim tries to open the url with the angle braces (see https://github.com/nvim-treesitter/nvim-treesitter/issues/7369).I have a crude fix ready and will submit a pull request once I wrote a test, if you agree that this should be changed.
Steps To Reproduce/Bad Parse Tree
gets parsed as
Expected Behavior/Parse Tree
Repro
No response