summaryrefslogtreecommitdiff
path: root/ale_linters/bib
diff options
context:
space:
mode:
authorbratekarate <bratekannkarate@gmail.com>2020-09-26 03:21:26 +0200
committerbratekarate <bratekannkarate@gmail.com>2020-09-26 03:21:26 +0200
commit5f2aeba8cc7c5918bdcd054778a28837ada8def3 (patch)
tree9e00ba006df1e5c4d7ca2bc9bdef80a34bf75725 /ale_linters/bib
parent08295ce17405cb5f6c80d2f726262493bfd21210 (diff)
downloadale-5f2aeba8cc7c5918bdcd054778a28837ada8def3.zip
bibclean: update matchlist reges for bibclean > v2.11.4
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