summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2021-08-13 09:33:00 +0200
committerGitHub <noreply@github.com>2021-08-13 09:33:00 +0200
commit58ec5aa8abfc8cdb47f81a7d0756d0209b6ae9ee (patch)
treed2f057c2a003cf6034fe89bc18bef81afdb3e6a4
parentb5c939280fb7ef577b3e52656f15d6e1253ce40e (diff)
parent934133a90660b1a64552bd838ca76d59f0722002 (diff)
downloaderlang-58ec5aa8abfc8cdb47f81a7d0756d0209b6ae9ee.tar.gz
Merge pull request #5110 from garazdawi/lukas/edoc/fix-broken-doc-link/GH-5058/OTP-17552
edoc: Use local definition of context
-rw-r--r--lib/edoc/src/edoc_extract.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/edoc/src/edoc_extract.erl b/lib/edoc/src/edoc_extract.erl
index cef5e55703..917faec972 100644
--- a/lib/edoc/src/edoc_extract.erl
+++ b/lib/edoc/src/edoc_extract.erl
@@ -41,6 +41,7 @@
-type filename() :: file:filename().
-type proplist() :: proplists:proplist().
+-type context() :: module | footer | function | overview | single.
%% @doc Like {@link source/5}, but reads the syntax tree and the
%% comments from the specified file.
@@ -233,7 +234,7 @@ add_macro_defs(Defs0, Opts, Env) ->
-spec file(File, Context, Env, Opts) -> {ok, Tags} | {error, Reason} when
File :: filename(),
- Context :: edoc_tags:tag_flag(),
+ Context :: context(),
Env :: edoc:env(),
Opts :: proplist(),
Tags :: [term()],
@@ -264,7 +265,7 @@ file(File, Context, Env, Opts) ->
-spec text(Text, Context, Env, Opts) -> Tags when
Text :: string(),
- Context :: overview,
+ Context :: context(),
Env :: edoc:env(),
Opts :: proplist(),
Tags :: [term()].