mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-31 01:32:00 -07:00
Fix code-span in headings in 'markdown-ts-mode' (bug#80979)
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings): Move the 'code_span' and 'code_span_delimiter' font-lock rules into a separate block with ':override prepend' instead of 'append'. The heading feature (level 1) applies its face via 'font-lock-append-text-property', so a code span that later appends 'markdown-ts-code-span' ends up with '(markdown-ts-heading-N markdown-ts-code-span)', where the heading face takes priority and the code-span face is suppressed. Prepending ensures 'markdown-ts-code-span' appears first in the face list and wins visually.
This commit is contained in:
parent
a00beb3a31
commit
0be998d4bc
1 changed files with 6 additions and 2 deletions
|
|
@ -1697,12 +1697,16 @@ Skip matches already inside tree-sitter link or autolink nodes."
|
|||
:override 'append
|
||||
'((fenced_code_block (code_fence_content) @markdown-ts--fontify-code-block))
|
||||
|
||||
:language 'markdown-inline
|
||||
:override 'prepend
|
||||
:feature 'paragraph-inline
|
||||
'(((code_span) @markdown-ts-code-span)
|
||||
((code_span_delimiter) @markdown-ts--fontify-delimiter))
|
||||
|
||||
:language 'markdown-inline
|
||||
:override 'append
|
||||
:feature 'paragraph-inline
|
||||
'(((link_destination) @markdown-ts--fontify-link-destination)
|
||||
((code_span) @markdown-ts-code-span)
|
||||
((code_span_delimiter) @markdown-ts--fontify-delimiter)
|
||||
((emphasis) @markdown-ts-emphasis)
|
||||
((strong_emphasis) @markdown-ts-bold)
|
||||
((strikethrough) @markdown-ts-strikethrough)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue