Skip to content

Commit 6635aaa

Browse files
committed
fix: E688 with option with empty value
Problem: If a file contains a line like this ``` \usepackage[key=]{package} ``` option parsing raises E688: More targets than List items. Solution: Use {keepempty} argument.
1 parent 4b4f18b commit 6635aaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/vimtex/state/class.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ function! s:parse_optionlist(string) abort " {{{1
328328
continue
329329
elseif l:element =~# '='
330330
" Key-value option
331-
let [l:key, l:value] = map(split(l:element, '='), {_, x -> trim(x)})
331+
let [l:key, l:value] = map(split(l:element, '=', 1), {_, x -> trim(x)})
332332

333333
if l:value ==? 'true'
334334
let l:options[l:key] = v:true

0 commit comments

Comments
 (0)