Skip to content

Commit

Permalink
Minor fix for individual property printer (agner spec -p)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 1, 2011
1 parent c16fa32 commit 1d8db43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/agner_spec.erl
Expand Up @@ -49,7 +49,12 @@ version_to_list({release, Version}) ->
-spec property_to_list(agner_spec_property()) -> string().

property_to_list({_,V}) when is_list(V) ->
io_lib:format("~s", [V]);
case io_lib:printable_list(V) of
true ->
io_lib:format("~s", [V]);
false ->
io_lib:format("~p", [V])
end;
property_to_list(Prop) when is_tuple(Prop) ->
io_lib:format("~p",[list_to_tuple(tl(tuple_to_list(Prop)))]);
property_to_list(undefined) ->
Expand Down

0 comments on commit 1d8db43

Please sign in to comment.