Merge pull request #1993 from mkborregaard/fix_plotattr

fix plotattr
This commit is contained in:
Michael Krabbe Borregaard 2019-04-10 10:09:15 +02:00 committed by GitHub
commit 7a1b48311c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,8 +50,13 @@ function plotattr(attrtype::Symbol, attribute::AbstractString)
desc = get(_arg_desc, attribute, "") desc = get(_arg_desc, attribute, "")
first_period_idx = findfirst(isequal('.'), desc) first_period_idx = findfirst(isequal('.'), desc)
typedesc = desc[1:first_period_idx-1] if isnothing(first_period_idx)
desc = strip(desc[first_period_idx+1:end]) typedesc = ""
desc = strip(desc)
else
typedesc = desc[1:first_period_idx-1]
desc = strip(desc[first_period_idx+1:end])
end
als = keys(filter(x->x[2]==attribute, _keyAliases)) |> collect |> sort als = keys(filter(x->x[2]==attribute, _keyAliases)) |> collect |> sort
als = join(map(string,als), ", ") als = join(map(string,als), ", ")
def = _attribute_defaults[attrtype][attribute] def = _attribute_defaults[attrtype][attribute]