diff --git a/lib/ex_doc/language/erlang.ex b/lib/ex_doc/language/erlang.ex index 68bf17328..63b446f97 100644 --- a/lib/ex_doc/language/erlang.ex +++ b/lib/ex_doc/language/erlang.ex @@ -572,10 +572,14 @@ defmodule ExDoc.Language.Erlang do {{:., _, [module, name]}, _, args}, acc -> {{:t, [], args}, [{pp({module, name}), {module, name, length(args)}} | acc]} - ## type module.type/0 + ## remote type module.type/0 {:., _, [module, name]} = ast, acc -> {ast, [{pp({module, name}), {module, name, 0}} | acc]} + ## remote type module.type/0 + {_local_name, {{:., _, [module, name]}, _, args}} = ast, acc -> + {ast, [{pp({module, name}), {module, name, length(args)}} | acc]} + {name, _, _}, acc when name in [:<<>>, :..] -> {nil, acc}