From 5f2aeba8cc7c5918bdcd054778a28837ada8def3 Mon Sep 17 00:00:00 2001 From: bratekarate Date: Sat, 26 Sep 2020 03:21:26 +0200 Subject: [PATCH] bibclean: update matchlist reges for bibclean > v2.11.4 --- ale_linters/bib/bibclean.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ale_linters/bib/bibclean.vim b/ale_linters/bib/bibclean.vim index 9056a9c3..1d1c9ec2 100644 --- a/ale_linters/bib/bibclean.vim +++ b/ale_linters/bib/bibclean.vim @@ -18,7 +18,12 @@ function! ale_linters#bib#bibclean#get_type(str) abort endfunction function! ale_linters#bib#bibclean#match_msg(line) abort - return matchlist(a:line, '^\(.*\) "stdin", line \(.*\): \(.*\)$') + " Legacy message pattern works for bibclean <= v2.11.4. If empty, try + " the new message pattern for bibtex > v2.11.4 + let l:matches_legacy = matchlist(a:line, '^\(.*\) stdin:\(\w\+\):\(.*\)$') + return ! empty(l:matches_legacy) + \ ? l:matches_legacy + \ : matchlist(a:line, '^\(.*\) "stdin", line \(.*\): \(.*\)$') endfunction function! ale_linters#bib#bibclean#match_entry(line) abort