Skip to content

ExDoc v0.18.2 Elixir v1.6.1 typespec causes crash on mix docs #831

@ianrumford

Description

@ianrumford

The following module compiles fine but will cause a crash on mix docs:

defmodule ExDocTestA do

  @moduledoc "An ExDoc Test"

  @type map42 :: any

end

The error:

** (EXIT from #PID<0.74.0>) an exception was raised:
** (KeyError) key "p42" not found in: %{"pp1" => "<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types\">any"}
(stdlib) :maps.get("p42", %{"pp1" => "<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types\">any"})
(ex_doc) lib/ex_doc/formatter/html/autolink.ex:301: anonymous fn/2 in ExDoc.Formatter.HTML.Autolink.replace_placeholders/2
(elixir) lib/regex.ex:666: Regex.apply_list/5
(elixir) lib/regex.ex:661: Regex.apply_list/5
(elixir) lib/regex.ex:603: Regex.do_replace/4
(ex_doc) lib/ex_doc/formatter/html/autolink.ex:138: anonymous fn/5 in ExDoc.Formatter.HTML.Autolink.all_typespecs/3
(elixir) lib/enum.ex:1899: Enum."-reduce/3-lists^foldl/2-0-"/3
(ex_doc) lib/ex_doc/formatter/html/autolink.ex:137: ExDoc.Formatter.HTML.Autolink.all_typespecs/3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions