fix(highlights): lower priority for codeblocks with injections (#4905)

This commit is contained in:
Christian Clason 2023-06-05 14:09:44 +02:00 committed by GitHub
parent 2d6e73ab2f
commit a034c7aa25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 14 deletions

View file

@ -112,10 +112,8 @@
(number_literal) @number
(char_literal) @character
[
(preproc_arg)
(preproc_defined)
] @function.macro
((preproc_arg) @function.macro (#set! "priority" 90))
(preproc_defined) @function.macro
(((field_expression
(field_identifier) @property)) @_parent

View file

@ -9,11 +9,9 @@
(atx_heading (atx_h5_marker) @text.title.5.marker (inline) @text.title.5)
(atx_heading (atx_h6_marker) @text.title.6.marker (inline) @text.title.6)
[
(link_title)
(indented_code_block)
(fenced_code_block)
] @text.literal
(link_title) @text.literal
(indented_code_block) @text.literal.block
((fenced_code_block) @text.literal.block (#set! "priority" 90))
(info_string) @label

View file

@ -15,7 +15,7 @@
(codespan
"`" @conceal (#set! conceal "")
text: (_) @text.literal)
(codeblock) @text.literal
((codeblock) @text.literal.block (#set! "priority" 90))
(codeblock
[">" (language)] @conceal (#set! conceal ""))
(block