mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Conceal reference and shortcut links in markdown
This change conceals `full_reference_link`, `collapsed_reference_link`, and `shortcut_link` similarly to the `markdown_inline` query file already conceals `inline_link` and `image`. ## Test markdown contents ```markdown Some text before the link [full reference link text][link label] and now some text after the link onto a new line. Some text before the link [collapsed reference link text][] and now some text after the link onto a new line. Some text before the link [shortcut link text] and now some text after the link onto a new line. ``` ## Test markdown concealed screenshot Closes #3267
This commit is contained in:
parent
e7b5e92d46
commit
cea9c5941d
1 changed files with 30 additions and 6 deletions
|
|
@ -48,11 +48,10 @@
|
|||
"["
|
||||
"]"
|
||||
"("
|
||||
(link_destination)
|
||||
(link_destination)
|
||||
")"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
; Conceal image links
|
||||
(image
|
||||
|
|
@ -61,7 +60,32 @@
|
|||
"["
|
||||
"]"
|
||||
"("
|
||||
(link_destination)
|
||||
(link_destination)
|
||||
")"
|
||||
] @conceal
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
; Conceal full reference links
|
||||
(full_reference_link
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
(link_label)
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
; Conceal collapsed reference links
|
||||
(collapsed_reference_link
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
; Conceal shortcut links
|
||||
(shortcut_link
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue