From ef60c155b855c5169e29074e656edd673b343cee Mon Sep 17 00:00:00 2001 From: Bryan Paxton Date: Sun, 10 Sep 2023 12:34:14 -0500 Subject: [PATCH] Add fixup for remote types in records with less depth --- lib/ex_doc/language/erlang.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}