From 4968de7826816b4a9eac94fd8776fe4b7454ca14 Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Mon, 4 Jun 2012 20:53:15 +0200 Subject: added special case for file names under Windows, thanks to Beads Land-Trujillo --- lib/edoc/src/edoc_lib.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl index 7fd8358add..90fb8a679c 100644 --- a/lib/edoc/src/edoc_lib.erl +++ b/lib/edoc/src/edoc_lib.erl @@ -469,6 +469,10 @@ uri_get("ftp:" ++ Path) -> uri_get("//" ++ Path) -> Msg = io_lib:format("cannot access network-path: '//~s'.", [Path]), {error, Msg}; +uri_get([C, $:, $/ | _]=Path) when C >= $A, C =< $Z; C >= $a, C =< $z -> + uri_get_file(Path); % special case for Windows +uri_get([C, $:, $\ | _]=Path) when C >= $A, C =< $Z; C >= $a, C =< $z -> + uri_get_file(Path); % special case for Windows uri_get(URI) -> case is_relative_uri(URI) of true -> -- cgit v1.2.3 From 715bb8044600ec16ad6ba97de9d033f6a5c06bfe Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 25 Jul 2012 18:04:11 +0100 Subject: List behaviour callbacks in Edoc when using -callback attribute Defining a behaviour_info/1 function is no longer the only way to define a behaviour; you can use -callback attributes as well. This change makes edoc aware of the latter, such that the module documentation page for a behaviour module will list the name and arity of the required callback functions. Ideally, edoc should use the type information present in the callback attributes, but with this change, the documentation is at least no worse than when using an explicit behaviour_info function. --- lib/edoc/src/edoc_data.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/edoc/src/edoc_data.erl b/lib/edoc/src/edoc_data.erl index aad0b14371..624f9177a2 100644 --- a/lib/edoc/src/edoc_data.erl +++ b/lib/edoc/src/edoc_data.erl @@ -167,7 +167,10 @@ callbacks(Es, Module, Env, Opts) -> case lists:any(fun (#entry{name = {behaviour_info, 1}}) -> true; (_) -> false end, - Es) of + Es) + orelse + lists:keymember(callback, 1, Module#module.attributes) + of true -> try (Module#module.name):behaviour_info(callbacks) of Fs -> -- cgit v1.2.3 From 3d9dcf8a8a483742f57924348ae56e4a6bfa1c3c Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Wed, 8 Aug 2012 00:31:15 +0300 Subject: bumped revision --- lib/edoc/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk index b8f33894f1..2f403212c8 100644 --- a/lib/edoc/vsn.mk +++ b/lib/edoc/vsn.mk @@ -1 +1 @@ -EDOC_VSN = 0.7.9.1 +EDOC_VSN = 0.7.10 -- cgit v1.2.3