mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(markdown): conceal triple backticks and HTML entities
This commit is contained in:
parent
9dd3e07609
commit
eb0f975bf2
2 changed files with 16 additions and 0 deletions
|
|
@ -26,6 +26,14 @@
|
|||
(fenced_code_block_delimiter)
|
||||
] @punctuation.delimiter
|
||||
|
||||
;; Conceal backticks
|
||||
(fenced_code_block
|
||||
(fenced_code_block_delimiter) @conceal
|
||||
(#set! conceal ""))
|
||||
(fenced_code_block
|
||||
(info_string (language) @conceal
|
||||
(#set! conceal "")))
|
||||
|
||||
(code_fence_content) @none
|
||||
|
||||
[
|
||||
|
|
|
|||
|
|
@ -92,3 +92,11 @@
|
|||
"]"
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
;; Replace common HTML entities.
|
||||
((entity_reference) @conceal (#eq? @conceal " ") (#set! conceal ""))
|
||||
((entity_reference) @conceal (#eq? @conceal "<") (#set! conceal "<"))
|
||||
((entity_reference) @conceal (#eq? @conceal ">") (#set! conceal ">"))
|
||||
((entity_reference) @conceal (#eq? @conceal "&") (#set! conceal "&"))
|
||||
((entity_reference) @conceal (#eq? @conceal """) (#set! conceal "\""))
|
||||
((entity_reference) @conceal (#any-of? @conceal " " " ") (#set! conceal " "))
|
||||
Loading…
Add table
Add a link
Reference in a new issue