diff options
author | Björn Gustavsson <[email protected]> | 2012-12-06 12:24:15 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-09 13:55:36 +0100 |
commit | beb660aa59a8d9cd7f65b8b91dc5dd9bc74015e0 (patch) | |
tree | e926a5816ed235709bfb42d518026244c4047ca8 /lib/edoc/src/edoc_refs.erl | |
parent | e174aab954388e0f6986239dfdcc7af37c1d71e5 (diff) | |
download | otp-beb660aa59a8d9cd7f65b8b91dc5dd9bc74015e0.tar.gz otp-beb660aa59a8d9cd7f65b8b91dc5dd9bc74015e0.tar.bz2 otp-beb660aa59a8d9cd7f65b8b91dc5dd9bc74015e0.zip |
edoc: Remove support for packages
Diffstat (limited to 'lib/edoc/src/edoc_refs.erl')
-rw-r--r-- | lib/edoc/src/edoc_refs.erl | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/edoc/src/edoc_refs.erl b/lib/edoc/src/edoc_refs.erl index 1f578a3b83..ea439490ed 100644 --- a/lib/edoc/src/edoc_refs.erl +++ b/lib/edoc/src/edoc_refs.erl @@ -126,7 +126,7 @@ abs_uri({package, P}, Env) -> module_ref(M, Env) -> case (Env#env.modules)(M) of "" -> - File = packages:last(M) ++ Env#env.file_suffix, + File = atom_to_list(M) ++ Env#env.file_suffix, Path = relative_module_path(M, Env#env.package), join_uri(Path, escape_uri(File)); Base -> @@ -134,8 +134,7 @@ module_ref(M, Env) -> end. module_absref(M, Env) -> - join_segments(packages:split(M)) - ++ escape_uri(Env#env.file_suffix). + escape_uri(atom_to_list(M)) ++ escape_uri(Env#env.file_suffix). package_ref(P, Env) -> case (Env#env.packages)(P) of @@ -147,7 +146,7 @@ package_ref(P, Env) -> end. package_absref(P, Env) -> - join_uri(join_segments(packages:split(P)), + join_uri(escape_uri(atom_to_list(P)), escape_uri(Env#env.package_summary)). app_ref(A, Env) -> @@ -179,14 +178,11 @@ join_segments([S | Ss]) -> %% The empty string is returned if the To module has only one segment, %% implying a local reference. -relative_module_path(To, From) -> - case first(packages:split(To)) of - [] -> ""; - P -> relative_path(P, packages:split(From)) - end. +relative_module_path(_To, _From) -> + "". relative_package_path(To, From) -> - relative_path(packages:split(To), packages:split(From)). + relative_path([atom_to_list(To)], [atom_to_list(From)]). %% This takes two lists of path segments (From, To). Note that an empty %% string will be returned if the paths are the same. Empty leading @@ -210,6 +206,3 @@ relative_path_2([], []) -> ""; relative_path_2([], Ts) -> join_segments(Ts). - -first([H | T]) when T /= [] -> [H | first(T)]; -first(_) -> []. |