Skip to content

Commit 695012e

Browse files
authored
Remove duplicate expression from ast_to_html/1 (#1185)
`ExDoc.Formatter.HTML.ast_to_html({tag, attrs, ast})` ends with two equivalent expressions that build the HTML iolist (the former is simply evaluated and discarded), so I removed the latter as it performs an extra concatenation.
1 parent a4ff547 commit 695012e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/ex_doc/formatter/html.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ defmodule ExDoc.Formatter.HTML do
128128
defp ast_to_html({tag, attrs, ast}) do
129129
attrs = Enum.map(attrs, fn {key, val} -> " #{key}=\"#{val}\"" end)
130130
["<#{tag}", attrs, ">", ast_to_html(ast), "</#{tag}>"]
131-
["<#{tag}#{attrs}>", ast_to_html(ast), "</#{tag}>"]
132131
end
133132

134133
defp output_setup(build, config) do

0 commit comments

Comments
 (0)