Skip to content

Commit 49b1ba1

Browse files
split fixed to account for {}
1 parent c1a0022 commit 49b1ba1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DocumentFunction.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ function getfunctionarguments(f::Function, m::Vector{String})
136136
r = match(r"(.*)\((.*)\)", m[i])
137137
end
138138
if typeof(r) != Nothing && length(r.captures) > 1
139-
fargs = strip.(split(r.captures[2], ", "))
139+
s = split(r.captures[2], r",(?=[^\}]*(?:\{)|[^\)]*(?:\()|$)")
140+
if length(s) == 1
141+
s = split(r.captures[2], ", ")
142+
end
143+
fargs = strip.(s)
140144
for j in 1:length(fargs)
141145
if !occursin("...", string(fargs[j])) && fargs[j] != ""
142146
push!(mp, fargs[j])

0 commit comments

Comments
 (0)