mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
Refactor markdown conceal code
This commit is contained in:
parent
778bfc337a
commit
536f4294f6
1 changed files with 25 additions and 21 deletions
|
|
@ -81,32 +81,36 @@
|
|||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
(inline_link
|
||||
["]"] @conceal
|
||||
(#set! conceal " "))
|
||||
|
||||
;; Inline_link Conceal
|
||||
; Conceal preceeding "[" character for inline links
|
||||
(inline_link
|
||||
"[" @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
;; Conceal @text.uri preceding '('
|
||||
([
|
||||
(link_label)
|
||||
(link_text)
|
||||
(image_description)
|
||||
] ["("] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
;; Conceal @text.uri text
|
||||
([
|
||||
(link_destination)
|
||||
(uri_autolink)
|
||||
; Conceal inline links
|
||||
(inline_link
|
||||
[
|
||||
"]"
|
||||
"("
|
||||
(link_destination)
|
||||
")"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
;; Conceal @text.uri proceding '('
|
||||
([
|
||||
(link_destination)
|
||||
(uri_autolink)
|
||||
] [")"] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
;; Image Conceal
|
||||
; Conceal preceeding "!" and "[" characters for image links
|
||||
(image
|
||||
["!" "["] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
; Conceal image links
|
||||
(image
|
||||
[
|
||||
"]"
|
||||
"("
|
||||
(link_destination)
|
||||
")"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue