runtime(help): fix end of sentence highlight in code examples

closes: #15745

Co-authored-by: Danilo Rezende <returndanilo@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-10-16 21:58:17 +02:00
parent 5e53fca76f
commit 4bfb89996f
2 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2024 Oct 08
" Last Change: 2024 Oct 16
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@ -47,7 +47,8 @@ syn match helpOption "'[a-z]\{2,\}'"
syn match helpOption "'t_..'"
syn match helpNormal "'ab'"
syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick
syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick
" doesn't allow a . directly after an ending backtick. See :helpgrep `[^`,]\+ [^`,]\+`\.
syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|[.?!]\?$\)"hs=s+1,he=e-1 contains=helpBacktick
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
if has("conceal")