mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -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)
|
(fenced_code_block_delimiter)
|
||||||
] @punctuation.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
|
(code_fence_content) @none
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,11 @@
|
||||||
"]"
|
"]"
|
||||||
] @conceal
|
] @conceal
|
||||||
(#set! 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