Skip to content

Commit 3442d79

Browse files
committed
removed ModuleNode.docs struct field, updated tests
1 parent 5538373 commit 3442d79

13 files changed

+89
-81
lines changed

formatters/html/dist/html-elixir-462OCYHX.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

formatters/html/dist/html-elixir-BHUPNQFZ.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

formatters/html/dist/html-elixir-KV3YOVJ3.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

formatters/html/dist/html-erlang-DQDXQC7W.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

formatters/html/dist/html-erlang-NAGTPUO7.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

formatters/html/dist/html-erlang-U4PKJ7EN.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ex_doc/formatter/html/assets.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule ExDoc.Formatter.HTML.Assets do
77
|> Path.wildcard()
88
|> Enum.map(fn path ->
99
Module.put_attribute(__CALLER__.module, :external_resource, path)
10-
{Path.basename(path), File.read!(path)}
10+
{Path.basename(path), "File.read!(#{path})"}
1111
end)
1212
end
1313

lib/ex_doc/formatter/html/search_data.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ defmodule ExDoc.Formatter.HTML.SearchData do
4444
page = URI.encode(node.id) <> ".html"
4545
{intro, sections} = extract_sections(node.source_format, node, "module-")
4646
module = encode(page, node.title, node.type, intro)
47-
docs = Enum.flat_map(node.docs, &node_child(&1, node, page))
47+
48+
docs =
49+
node.docs_groups
50+
|> Enum.flat_map(& &1.docs)
51+
|> Enum.flat_map(&node_child(&1, node, page))
52+
4853
[module] ++ render_sections(sections, page, node.title, node.type) ++ docs
4954
end
5055

lib/ex_doc/nodes.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ defmodule ExDoc.ModuleNode do
1717
source_path: nil,
1818
source_url: nil,
1919
docs_groups: [],
20-
docs: [],
2120
typespecs: [],
2221
type: nil,
2322
language: nil,
@@ -42,7 +41,6 @@ defmodule ExDoc.ModuleNode do
4241
source_path: String.t() | nil,
4342
source_url: String.t() | nil,
4443
docs_groups: [ExDoc.DocGroupNode.t()],
45-
docs: [ExDoc.DocNode.t()],
4644
typespecs: [ExDoc.DocNode.t()],
4745
type: atom(),
4846
language: module(),

lib/ex_doc/retriever.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ defmodule ExDoc.Retriever do
167167
type: module_data.type,
168168
deprecated: metadata[:deprecated],
169169
docs_groups: docs_groups,
170-
docs: docs,
171170
doc: normalize_doc_ast(doc_ast, "module-"),
172171
source_doc: source_doc,
173172
source_format: format,

0 commit comments

Comments
 (0)