Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/ex_doc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Code.prepend_path Path.expand("../_build/#{mix_env}/lib/makeup_elixir/ebin", __D
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/makeup_erlang/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/makeup_html/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/earmark_parser/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/rustler_precompiled/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/castore/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/jason/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/mdex/ebin", __DIR__)
Code.prepend_path Path.expand("../_build/#{mix_env}/lib/ex_doc/ebin", __DIR__)

if Code.ensure_loaded?(ExDoc.CLI) do
Expand Down
7 changes: 6 additions & 1 deletion lib/ex_doc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ defmodule ExDoc do
end

defp find_formatter(name) do
[ExDoc.Formatter, String.upcase(name)]
[ExDoc.Formatter, modname(name)]
|> Module.concat()
|> check_formatter_module(name)
end

defp modname("epub"), do: EPUB
defp modname("html"), do: HTML
defp modname("markdown"), do: Markdown
defp modname(_), do: nil

defp check_formatter_module(modname, argname) do
if Code.ensure_loaded?(modname) do
modname
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_doc/cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ defmodule ExDoc.CLI do
--canonical Indicate the preferred URL with rel="canonical" link element
-c, --config Give configuration through a file instead of a command line.
See "Custom config" section below for more information.
-f, --formatter Docs formatter to use (html or epub), default: html and epub
-f, --formatter Docs formatter to use (html, epub or markdown), default: html and epub
--homepage-url URL to link to for the site name
--language Identify the primary language of the documents, its value must be
a valid [BCP 47](https://tools.ietf.org/html/bcp47) language tag, default: "en"
Expand Down
Loading