mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(image): markdown inline link query for shortened urls (#1481)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> This fixes the `image.src` capture for markdown shortcut links, which (imho) are links like `![[attachments/test.jpg]]`. The current query captures also the `[...]`. If we talk about a different type of links for this query, it would be interesting to know which ones :). ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. -->
This commit is contained in:
parent
e1e30a1411
commit
2daa1b28b2
1 changed files with 2 additions and 2 deletions
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
(image
|
||||
(image
|
||||
[
|
||||
(link_destination) @image.src
|
||||
(image_description (shortcut_link (link_text) @image.src))
|
||||
(image_description (shortcut_link ((link_text) @image.src)))
|
||||
]
|
||||
(#gsub! @image.src "|.*" "") ; remove wikilink image options
|
||||
(#gsub! @image.src "^<" "") ; remove bracket link
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue