Style improvements
This commit is contained in:
parent
8c2d25ebb9
commit
75a95c6801
@ -120,19 +120,20 @@ endfunction
|
|||||||
function! s:input_line_parser_tex(line, file, re) " {{{1
|
function! s:input_line_parser_tex(line, file, re) " {{{1
|
||||||
" Handle \space commands
|
" Handle \space commands
|
||||||
let l:file = substitute(a:line, '\\space\s*', ' ', 'g')
|
let l:file = substitute(a:line, '\\space\s*', ' ', 'g')
|
||||||
let l:subimport = 0
|
|
||||||
|
|
||||||
" Handle import package commands
|
" Handle import package commands
|
||||||
|
let l:subimport = 0
|
||||||
if l:file =~# '\v\\%(sub)?%(import|%(input|include)from)'
|
if l:file =~# '\v\\%(sub)?%(import|%(input|include)from)'
|
||||||
let l:candidate = s:input_line_parser_tex(
|
let l:candidate = s:input_line_parser_tex(
|
||||||
\ substitute(l:file, '\\\w*\s*{[^{}]*}\s*', '', ''),
|
\ substitute(l:file, '\\\w*\s*{[^{}]*}\s*', '', ''),
|
||||||
\ a:file,
|
\ a:file,
|
||||||
\ '\v^\s*\{')
|
\ '\v^\s*\{')
|
||||||
if !empty(l:candidate) | return l:candidate | endif
|
if !empty(l:candidate) | return l:candidate | endif
|
||||||
let l:file = substitute(l:file, '}\s*{', '', 'g')
|
|
||||||
|
|
||||||
" Handle relative paths
|
" Handle relative paths
|
||||||
let l:subimport = l:file =~# '\v\\sub%(import|%(input|include)from)'
|
let l:subimport = l:file =~# '\v\\sub%(import|%(input|include)from)'
|
||||||
|
|
||||||
|
let l:file = substitute(l:file, '}\s*{', '', 'g')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Parse file name
|
" Parse file name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user