runtime(rst): Style update

Commit: 
https://github.com/vim/vim/commit/46d86979a9208e0842e1d8cfc0341737efc95e75
Author: Marshall Ward <[email protected]>
Date:   Mon Oct 13 18:33:56 2025 +0000

    runtime(rst): Style update
    
    Minor style and whitespace changes to the reST syntax file, to sync with
    the development branch.
    
    related: #18566
    
    Signed-off-by: Marshall Ward <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index bb9a0b3a4..9584947df 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -2,8 +2,9 @@
 " Language: reStructuredText documentation format
 " Maintainer: Marshall Ward <[email protected]>
 " Previous Maintainer: Nikolai Weibull <[email protected]>
+" Reference: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
 " Website: https://github.com/marshallward/vim-restructuredtext
-" Latest Revision: 2020-03-31
+" Latest Revision: 2025-10-13
 
 if exists("b:current_syntax")
   finish
@@ -12,7 +13,8 @@ endif
 let s:cpo_save = &cpo
 set cpo&vim
 
-syn case ignore
+" reStructuredText is case-insensitive
+syntax case ignore
 
 syn match   rstTransition  /^[=`:.'"~^_*+#-]\{4,}\s*$/
 
@@ -97,6 +99,9 @@ execute 'syn region rstExDirective contained 
matchgroup=rstDirective' .
 execute 'syn match rstSubstitutionDefinition contained' .
       \ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
 
+
+"" Inline Markup ""
+
 function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, 
char_right)
   " Only escape the first char of a multichar delimiter (e.g. \* inside **)
   if a:start[0] == '\'
@@ -190,6 +195,8 @@ execute 'syn match rstHyperlinkReference' .
 syn match   rstStandaloneHyperlink  contains=@NoSpell
       \ 
"\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
 
+" `code` is the standard reST directive for source code.
+" `code-block` and `sourcecode` are nearly identical directives in Sphinx.
 syn region rstCodeBlock contained matchgroup=rstDirective
       \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s*\(\S*\)\?\s*
\%(\s*:.*:\s*.*\s*
\)*
\ze\z(\s\+\)+
       \ skip=+^$+

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v8NXm-00CgrN-Cg%40256bit.org.

Raspunde prin e-mail lui