Skip to content

Commit

Permalink
Add fixup for remote types in records with less depth
Browse files Browse the repository at this point in the history
  • Loading branch information
starbelly committed Sep 10, 2023
1 parent 6edb0ec commit ef60c15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ex_doc/language/erlang.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit ef60c15

Please sign in to comment.