Skip to content

Commit 79e347d

Browse files
committed
minor refactor
1 parent 76a9c84 commit 79e347d

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

lib/ex_doc/formatter/markdown.ex

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,13 @@ defmodule ExDoc.Formatter.MARKDOWN do
7474
end
7575

7676
defp generate_extras(extras, config) do
77-
for %ExDoc.ExtraNode{id: id, source_doc: source_doc} <- extras do
77+
for %ExDoc.ExtraNode{id: id, source_doc: content} <- extras do
7878
filename = "#{id}.md"
79-
output = Path.join(config.output, filename)
80-
File.write!(output, source_doc)
79+
80+
config.output
81+
|> Path.join(filename)
82+
|> File.write!(content)
83+
8184
filename
8285
end
8386
end
@@ -92,11 +95,16 @@ defmodule ExDoc.Formatter.MARKDOWN do
9295

9396
defp generate_module(module_node, config) do
9497
content =
95-
Templates.module_template(config, module_node)
98+
config
99+
|> Templates.module_template(module_node)
96100
|> normalize_output()
97101

98102
filename = "#{module_node.id}.md"
99-
File.write(Path.join(config.output, filename), content)
103+
104+
config.output
105+
|> Path.join(filename)
106+
|> File.write(content)
107+
100108
filename
101109
end
102110
end

0 commit comments

Comments
 (0)