Fixed #664: Regex matched too much

This commit is contained in:
Karl Yngve Lervåg 2017-01-19 22:04:58 +01:00
parent a9e8f2e502
commit 96ce49de01

View File

@ -411,7 +411,7 @@ function! s:img.get_graphicspaths() dict " {{{2
" Parse preamble for graphicspath command " Parse preamble for graphicspath command
let l:graphicspath = matchstr(join(l:preamble, ' '), let l:graphicspath = matchstr(join(l:preamble, ' '),
\ '\\graphicspath{\s*{\s*\zs.*\ze\s*}\s*}') \ '\\graphicspath{\s*{\s*\zs.\{-}\ze\s*}\s*}')
let self.graphicspaths = map(split(l:graphicspath, '}\s*{'), let self.graphicspaths = map(split(l:graphicspath, '}\s*{'),
\ 'v:val[0] ==# ''/'' ? v:val : simplify(b:vimtex.root . ''/'' . v:val)') \ 'v:val[0] ==# ''/'' ? v:val : simplify(b:vimtex.root . ''/'' . v:val)')
endfunction endfunction