Skip to content

Commit

Permalink
Move loading to start/2
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed May 1, 2020
1 parent 7990f37 commit a4a525e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/ex_doc/application.ex
Expand Up @@ -3,6 +3,7 @@ defmodule ExDoc.Application do
use Application

def start(_type, _args) do
Enum.each([:eex, :ex_unit, :iex, :logger, :mix], &Application.load/1)
Supervisor.start_link([ExDoc.Refs], strategy: :one_for_one)
end
end
3 changes: 0 additions & 3 deletions lib/ex_doc/formatter/html.ex
Expand Up @@ -65,9 +65,6 @@ defmodule ExDoc.Formatter.HTML do
Autolinks and renders all docs.
"""
def render_all(project_nodes, ext, config, opts) do
# Load all Elixir built-in apps
Enum.each([:eex, :ex_unit, :iex, :logger, :mix], &Application.ensure_loaded/1)

project_nodes
|> Enum.map(fn node ->
autolink_opts = [
Expand Down
4 changes: 4 additions & 0 deletions test/ex_doc/autolink_test.exs
Expand Up @@ -18,6 +18,10 @@ defmodule ExDoc.AutolinkTest do
assert autolinked(~t"Elixir.String") == "https://hexdocs.pm/elixir/String.html"
end

test "other elixir core module" do
assert autolinked(~t"IEx.Helpers") == "https://hexdocs.pm/iex/IEx.Helpers.html"
end

test "private module" do
assert_unchanged(~t"String.Unicode")
end
Expand Down

0 comments on commit a4a525e

Please sign in to comment.