summaryrefslogtreecommitdiff
path: root/ale_linters/bib
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/bib')
-rw-r--r--ale_linters/bib/bibclean.vim7
1 files changed, 6 insertions, 1 deletions
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