Fix a minor bug (#524)
This commit is contained in:
parent
83d32b4554
commit
a7d8a94500
@ -17,7 +17,7 @@ function! vimtex#format#init_script() " {{{1
|
|||||||
\ '%(\\\[|\$\$)\s*$',
|
\ '%(\\\[|\$\$)\s*$',
|
||||||
\], '|') . ')'
|
\], '|') . ')'
|
||||||
|
|
||||||
let s:border_end = '\\%(' . join([
|
let s:border_end = '\v\\%(' . join([
|
||||||
\ '\\\*?',
|
\ '\\\*?',
|
||||||
\ 'clear%(double)?page',
|
\ 'clear%(double)?page',
|
||||||
\ 'linebreak',
|
\ 'linebreak',
|
||||||
@ -103,6 +103,9 @@ function! s:format(top, bottom) " {{{1
|
|||||||
|
|
||||||
" Skip all lines with comments
|
" Skip all lines with comments
|
||||||
if l:line =~# '\v%(^|[^\\])\%'
|
if l:line =~# '\v%(^|[^\\])\%'
|
||||||
|
if l:current < l:mark
|
||||||
|
let l:bottom += s:format_build_lines(l:current+1, l:mark)
|
||||||
|
endif
|
||||||
let l:mark = l:current - 1
|
let l:mark = l:current - 1
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
@ -84,7 +84,8 @@ Expect tex (Verify):
|
|||||||
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
|
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
|
||||||
diam voluptua. At vero eos et accusam et justo duo dolores et ea \\
|
diam voluptua. At vero eos et accusam et justo duo dolores et ea \\
|
||||||
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
|
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
|
||||||
\item ipsum dolor sit amet. start a new paragraph % test
|
\item ipsum dolor sit amet.
|
||||||
|
start a new paragraph % test
|
||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
||||||
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
||||||
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
||||||
|
Loading…
Reference in New Issue
Block a user