Skip to content

Commit

Permalink
Fix content type identification
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed May 1, 2020
1 parent a4a525e commit 10bcd71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ex_doc/retriever.ex
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ defmodule ExDoc.Retriever do
{first in ?a..?z, name, arity}
end

defp doc_ast(_, nil, _options), do: nil
defp doc_ast(_, :none, _options), do: nil
defp doc_ast(_, :hidden, _options), do: nil
defp doc_ast("text/markdown", %{"en" => doc}, options), do: Markdown.to_ast(doc, options)
defp doc_ast(other, _, _options), do: raise("content type #{inspect(other)} is not supported")

defp doc_ast(other, %{"en" => _}, _),
do: raise("content type #{inspect(other)} is not supported")

# Module Helpers

Expand Down

0 comments on commit 10bcd71

Please sign in to comment.