Fixups
This commit is contained in:
parent
4aadd46bbf
commit
9986daee0a
@ -104,9 +104,7 @@ function! argwrap#updateScope(stack, char)
|
||||
endfunction
|
||||
|
||||
function! argwrap#trimArgument(text)
|
||||
let l:stripped = substitute(a:text, "\\s\\+", "", "")
|
||||
let l:stripped = substitute(l:stripped, "^\\s\\+", "", "")
|
||||
return l:stripped
|
||||
return substitute(a:text, '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||
endfunction
|
||||
|
||||
function! argwrap#extractArguments(text)
|
||||
|
16
sample.txt
16
sample.txt
@ -1,12 +1,16 @@
|
||||
a = Foo("a": 4, "z": 2, [b, z], "hello, world", c)
|
||||
a = Foo(
|
||||
"a": 4,
|
||||
"z": 2,
|
||||
[b, z],
|
||||
"hello, world",
|
||||
c
|
||||
)
|
||||
|
||||
Foo(a b, c d)
|
||||
|
||||
Foo(a, b)
|
||||
|
||||
Foo(
|
||||
a,
|
||||
[b, c],
|
||||
d
|
||||
)
|
||||
Foo(a, [b, [2, 3] c], d)
|
||||
|
||||
Foo(
|
||||
a,
|
||||
|
Loading…
Reference in New Issue
Block a user