mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(markdown): broader link recognition
**Problem:** Neovim's `gx` will not work when the cursor is on the first `[` of an inline Markdown link. **Solution:** Set the `url` metadata property on the link parent node, rather than just the link label node
This commit is contained in:
parent
1fbc25fc11
commit
b8ad0473f4
1 changed files with 4 additions and 6 deletions
|
|
@ -40,14 +40,12 @@
|
|||
(image_description)
|
||||
] @markup.link.label
|
||||
|
||||
(inline_link
|
||||
(link_text) @_label
|
||||
(link_destination) @_url
|
||||
((inline_link
|
||||
(link_destination) @_url) @_label
|
||||
(#set! @_label url @_url))
|
||||
|
||||
(image
|
||||
(image_description) @_label
|
||||
(link_destination) @_url
|
||||
((image
|
||||
(link_destination) @_url) @_label
|
||||
(#set! @_label url @_url))
|
||||
|
||||
; Conceal image links
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue