mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -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)
|
(image_description)
|
||||||
] @markup.link.label
|
] @markup.link.label
|
||||||
|
|
||||||
(inline_link
|
((inline_link
|
||||||
(link_text) @_label
|
(link_destination) @_url) @_label
|
||||||
(link_destination) @_url
|
|
||||||
(#set! @_label url @_url))
|
(#set! @_label url @_url))
|
||||||
|
|
||||||
(image
|
((image
|
||||||
(image_description) @_label
|
(link_destination) @_url) @_label
|
||||||
(link_destination) @_url
|
|
||||||
(#set! @_label url @_url))
|
(#set! @_label url @_url))
|
||||||
|
|
||||||
; Conceal image links
|
; Conceal image links
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue