Merge pull request #213 from camilstaps/master

Fixes #212. Fix pdflatex substitution to work with Latexmk's 'internal' keyword
This commit is contained in:
Karl Yngve Lervåg 2015-09-19 21:21:48 +02:00
commit e33d027dc7
2 changed files with 3 additions and 3 deletions

View File

@ -384,7 +384,7 @@ function! s:latexmk_build_cmd() " {{{1
let cmd .= ' ' . g:vimtex_latexmk_options let cmd .= ' ' . g:vimtex_latexmk_options
let cmd .= ' -e ' . vimtex#util#shellescape( let cmd .= ' -e ' . vimtex#util#shellescape(
\ '$pdflatex =~ s/ / -file-line-error /') \ '$pdflatex =~ s/^((.(?<!^internal(?=\s)))*?) /$1 -file-line-error /')
if g:vimtex_latexmk_build_dir !=# '' if g:vimtex_latexmk_build_dir !=# ''
let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir
endif endif

View File

@ -123,7 +123,7 @@ endfunction
function! vimtex#util#shellescape(path) " {{{1 function! vimtex#util#shellescape(path) " {{{1
" Blackslashes in path must be escaped to be correctly parsed by the " Blackslashes in path must be escaped to be correctly parsed by the
" substitute() function. " substitute() function.
let l:path = escape(a:path, '\') let l:path = has('win32') ? escape(a:path, '\') : a:path
" "
" In a Windows environment, a path used in "cmd" only needs to be enclosed by " In a Windows environment, a path used in "cmd" only needs to be enclosed by
@ -132,7 +132,7 @@ function! vimtex#util#shellescape(path) " {{{1
" reports an error. Any path that goes into vimtex#util#execute() should be " reports an error. Any path that goes into vimtex#util#execute() should be
" processed through this function. " processed through this function.
" "
return has('win32') ? '"' . l:path . '"' : shellescape(l:path) return has('win32') ? '"' . l:path . '"' : shellescape(l:path, 1)
endfunction endfunction
" }}}1 " }}}1