Skip to content

Commit 13aaba2

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

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/DocumentFunction.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,13 @@ function getfunctionkeywords(f::Function, m::Vector{String})
170170
for i in 1:l
171171
r = match(r"(.*)\(([^;]*);(.*)\)", m[i])
172172
if typeof(r) != Nothing && length(r.captures) > 2
173-
kwargs = strip.(split(r.captures[3], ", "))
173+
s = split(r.captures[3], r",(?=[^\}]*(?:\{)|[^\)]*(?:\()|$)")
174+
if length(s) == 1
175+
s = split(r.captures[3], ", ")
176+
end
177+
kwargs = strip.(s)
174178
for j in 1:length(kwargs)
179+
@show
175180
if !occursin("...", string(kwargs[j])) && kwargs[j] != ""
176181
push!(mp, kwargs[j])
177182
end

0 commit comments

Comments
 (0)