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