]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(rst): Fix highlights nested in directive body
authorMinjie Xu <madjxatw@gmail.com>
Mon, 13 Oct 2025 18:27:49 +0000 (18:27 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 13 Oct 2025 18:27:49 +0000 (18:27 +0000)
commit47949b4b46965fdabbbe84cbe14027890d4ed3b8
treeaba0c70ae6762601d1881713809914c0ad4abe0e
parent310082f3cfab92a28a635b0dc2a972c7f1fa5b92
runtime(rst): Fix highlights nested in directive body

The leading two dots of a RST directive gets matched by
rstExplicitMarkup group first, and then the directive name and directive
body will be matched by the groups contained in rstDirectives cluster in
order.

The rstExDirective group in rstDiretives matches any RST directives
other than footnote, citation and hyperlink target, therefore admonition
and code block will be matched by rstExDirective. This fix has
rstExDirective contain rstExplicitMarkup so as to enable recursive RST
directives match.

The interpreted texts enclosed in quotes are not highlighted within a
RST directive body, because the rstCruft cluster contains a non-existing
rstInterpretedText group.It should be renamed to
rstInterpretedTextOrHyperlinkReference which is defined in a
DefineInlineMarkup function call.

related: #18566

Signed-off-by: Minjie Xu <madjxatw@gmail.com>
Signed-off-by: Marshall Ward <marshall.ward@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/rst.vim