Skip to content

Commit aecbe8c

Browse files
author
José Valim
committed
Handle special forms signatures properly
1 parent b7db018 commit aecbe8c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/ex_doc/html_formatter/templates.ex

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ defmodule ExDoc.HTMLFormatter.Templates do
4646

4747
# Get the full signature from a function
4848
defp signature(ExDoc.FunctionNode[name: name, signature: args]) do
49-
Macro.to_string { name, 0, args }
49+
cond do
50+
name in [:__aliases__, :__block__] ->
51+
"#{name}(args)"
52+
name in [:__ENV__, :__MODULE__, :__DIR__, :__CALLER__] ->
53+
"#{name}"
54+
true ->
55+
Macro.to_string { name, 0, args }
56+
end
5057
end
5158

5259
# Get the first paragraph of the documentation of a node, if any.

0 commit comments

Comments
 (0)