]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(pandoc): update YAML metadata block parsing in compiler runtime
authorAlexander Abrosimov <alexander.n.abrosimov@gmail.com>
Thu, 15 May 2025 18:06:29 +0000 (20:06 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 15 May 2025 18:06:29 +0000 (20:06 +0200)
Previously the incorrect regexp forced title to be a single letter
because of using '+' instead of the '\+' regexp modifier.

closes: #17321

Signed-off-by: Alexander Abrosimov <alexander.n.abrosimov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/compiler/pandoc.vim

index 5d90a518c98d364c13f4fcd436ae10a6aa3bba2b..40d2d026339c17d49bb9043fae93d48eb4408bec 100644 (file)
@@ -2,6 +2,7 @@
 " Compiler:     Pandoc
 " Maintainer:   Konfekt
 " Last Change: 2024 Nov 19
+" 2025 May 15 Update the title regex for CompilerSet #17321
 "
 " Expects output file extension, say `:make html` or `:make pdf`.
 " Passes additional arguments to pandoc, say `:make html --self-contained`.
@@ -51,7 +52,7 @@ endfunction
 
 execute 'CompilerSet makeprg=pandoc'..escape(
     \ ' --standalone'..
-    \ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ?
+    \ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s\+\S\+', 'cnw') > 0)) ?
     \ '' : ' --metadata title=%:t:r:S')..
     \ ' '..s:PandocLang()..
     \ ' --from='..s:PandocFiletype(&filetype)..