aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc/src/edoc_layout.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-09-22 17:55:15 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-09-22 17:55:15 +0200
commit8c8bd46bcc9d839e5de0687784d15dc819cb3ee8 (patch)
treee96eeeef77fbff40138ddf35576823921dc110fb /lib/edoc/src/edoc_layout.erl
parentc5afc45c9236a90dc408c9284a069a9dc233ad4e (diff)
parentbca562455e1e8cb8be5a5a5de53c926eba51f977 (diff)
downloadotp-8c8bd46bcc9d839e5de0687784d15dc819cb3ee8.tar.gz
otp-8c8bd46bcc9d839e5de0687784d15dc819cb3ee8.tar.bz2
otp-8c8bd46bcc9d839e5de0687784d15dc819cb3ee8.zip
Merge branch 'maint'
Conflicts: lib/stdlib/src/erl_pp.erl
Diffstat (limited to 'lib/edoc/src/edoc_layout.erl')
-rw-r--r--lib/edoc/src/edoc_layout.erl15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index c9761dc2a6..36d067d9bc 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -844,8 +844,6 @@ t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
t_type([#xmlElement{name = map, content = Es}]) ->
t_map(Es);
-t_type([#xmlElement{name = map_field, content=Es}]) ->
- t_map_field(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
@@ -895,9 +893,10 @@ t_fun(Es) ->
[") -> "] ++ t_utype(get_elem(type, Es))).
t_map(Es) ->
- ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+ Fs = get_elem(map_field, Es),
+ ["#{"] ++ seq(fun t_map_field/1, Fs, ["}"]).
-t_map_field([K,V]) ->
+t_map_field(#xmlElement{content = [K,V]}) ->
t_utype_elem(K) ++ [" => "] ++ t_utype_elem(V).
t_record(E, Es) ->
@@ -1097,8 +1096,6 @@ ot_type([#xmlElement{name = tuple, content = Es}]) ->
ot_tuple(Es);
ot_type([#xmlElement{name = map, content = Es}]) ->
ot_map(Es);
-ot_type([#xmlElement{name = map_field, content = Es}]) ->
- ot_map_field(Es);
ot_type([#xmlElement{name = 'fun', content = Es}]) ->
ot_fun(Es);
ot_type([#xmlElement{name = record, content = Es}]) ->
@@ -1156,10 +1153,10 @@ ot_tuple(Es) ->
{type,0,tuple,[ot_utype_elem(E) || E <- Es]}.
ot_map(Es) ->
- {type,0,map,[ot_utype_elem(E) || E <- Es]}.
+ {type,0,map,[ot_map_field(E) || E <- get_elem(map_field,Es)]}.
-ot_map_field(Es) ->
- {type,0,map_field_assoc,[ot_utype_elem(E) || E <- Es]}.
+ot_map_field(#xmlElement{content=[K,V]}) ->
+ {type,0,map_field_assoc,ot_utype_elem(K), ot_utype_elem(V)}.
ot_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),