File tree Expand file tree Collapse file tree 7 files changed +14
-5
lines changed Expand file tree Collapse file tree 7 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.Autolink do
2
+ # Encapsulates all functionality related to autolinking.
2
3
@ moduledoc false
3
4
4
5
# * `:apps` - the apps that the docs are being generated for. When linking modules they are
Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.DocAST do
2
+ # General helpers for dealing with the documentation AST
3
+ # (which is the Markdown -> HTML AST).
2
4
@ moduledoc false
3
5
4
6
@ type t :: term ( )
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ defmodule ExDoc.Formatter.HTML.Templates do
163
163
[ sections: sections ]
164
164
end
165
165
166
- # TODO: split into sections in Formatter.HTML instead.
166
+ # TODO: split into sections in Formatter.HTML instead (possibly via DocAST)
167
167
@ h2_regex ~r/ <h2.*?>(.*?)<\/ h2>/ m
168
168
defp extract_headers ( content ) do
169
169
@ h2_regex
@@ -193,8 +193,9 @@ defmodule ExDoc.Formatter.HTML.Templates do
193
193
defp sidebar_type ( :livemd ) , do: "extras"
194
194
defp sidebar_type ( :extra ) , do: "extras"
195
195
196
- # TODO: Move link_headings and friends to html.ex or even to autolinking code,
197
- # so content is built with it upfront instead of added at the template level.
196
+ # TODO: Move link_headings and friends to html.ex (possibly via DocAST)
197
+ # or even to autolinking code, so content is built with it upfront instead
198
+ # of added at the template level.
198
199
199
200
@ doc """
200
201
Add link headings for the given `content`.
Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.GroupMatcher do
2
+ # General helpers for dealing with grouping functionality.
3
+ # Extracted for organization and testability.
2
4
@ moduledoc false
3
5
4
6
@ type pattern :: Regex . t ( ) | module ( ) | String . t ( )
Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.Language.Source do
2
+ # Shared helpers used by both Erlang and Elixir.
2
3
@ moduledoc false
3
4
4
5
def anno_line ( line ) when is_integer ( line ) , do: abs ( line )
Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.Refs do
2
- @ moduledoc false
3
-
4
2
# A read-through cache of documentation references.
5
3
#
6
4
# A given ref is always associated with a module. If we don't have a ref
7
5
# in the cache we fetch the module's docs chunk and fill in the cache.
8
6
#
9
7
# If the module does not have the docs chunk, we fetch it's functions,
10
8
# callbacks and types from other sources.
9
+ @ moduledoc false
11
10
12
11
@ typep entry ( ) :: { ref ( ) , visibility ( ) }
13
12
Original file line number Diff line number Diff line change 1
1
defmodule ExDoc.Utils do
2
+ # General helpers used throughout ExDoc or extracted for testing.
3
+ # Avoid adding functions to this module whenever possible,
4
+ # instead prefer defining modules closer to the context they are used.
2
5
@ moduledoc false
3
6
4
7
@ doc """
You can’t perform that action at this time.
0 commit comments