bibclean: update matchlist reges for bibclean > v2.11.4

This commit is contained in:
bratekarate 2020-09-26 03:21:26 +02:00
parent 08295ce174
commit 5f2aeba8cc
No known key found for this signature in database
GPG Key ID: CBE985B21612482E
1 changed files with 6 additions and 1 deletions

View File

@ -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