-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace OTP /man/ links with /apps/:app/ #1909
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,13 @@ defmodule ExDoc.Formatter.HTML.ErlangTest do | |
html = Floki.raw_html(doc) | ||
|
||
assert html =~ | ||
~s|-spec</span> foo(<a href=\"#t:t/0\">t</a>()) -> <a href=\"#t:t/0\">t</a>().| | ||
~s|-spec</span> foo(<a href="#t:t/0">t</a>()) -> <a href="#t:t/0">t</a>().| | ||
|
||
assert html =~ | ||
~s|-type</span> t() :: <a href=\"https://www.erlang.org/doc/man/erlang.html#t:atom/0\">atom</a>().| | ||
~s|-type</span> t() :: <a href="https://www.erlang.org/doc/apps/erts/erlang.html#t:atom/0">atom</a>().| | ||
|
||
assert html =~ | ||
~s|-type</span> t2() :: #rec{k1 :: <a href=\"https://www.erlang.org/doc/man/uri_string.html#t:uri_string/0\">uri_string:uri_string</a>(), k2 :: <a href=\"https://www.erlang.org/doc/man/uri_string.html#t:uri_string/0\">uri_string:uri_string</a>() \| undefined}.| | ||
~s|-type</span> t2() :: #rec{k1 :: <a href="https://www.erlang.org/doc/apps/stdlib/uri_string.html#t:uri_string/0">uri_string:uri_string</a>(), k2 :: <a href="https://www.erlang.org/doc/apps/stdlib/uri_string.html#t:uri_string/0">uri_string:uri_string</a>() \| undefined}.| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
defp generate_docs(c) do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,12 @@ defmodule ExDoc.Language.ElixirTest do | |
|
||
test "m:module with Erlang module" do | ||
assert autolink_doc("`m::array`") == | ||
~s|<a href="https://www.erlang.org/doc/man/array.html"><code class="inline">:array</code></a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/array.html"><code class="inline">:array</code></a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "m:module with Erlang module and fragment" do | ||
assert autolink_doc("`m::array#fragment`") == | ||
~s|<a href="https://www.erlang.org/doc/man/array.html#fragment"><code class="inline">:array</code></a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/array.html#fragment"><code class="inline">:array</code></a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this is good as well. :) I checked, I just didn't comment. My bad. :) |
||
end | ||
|
||
test "module with fragment without m: does not link" do | ||
|
@@ -99,7 +99,7 @@ defmodule ExDoc.Language.ElixirTest do | |
|
||
test "erlang stdlib function" do | ||
assert autolink_doc("`:lists.all/2`") == | ||
~s|<a href="https://www.erlang.org/doc/man/lists.html#all/2"><code class="inline">:lists.all/2</code></a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/lists.html#all/2"><code class="inline">:lists.all/2</code></a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "local function" do | ||
|
@@ -150,7 +150,7 @@ defmodule ExDoc.Language.ElixirTest do | |
|
||
test "erlang callback" do | ||
assert autolink_doc("`c::gen_server.handle_call/3`") == | ||
~s|<a href="https://www.erlang.org/doc/man/gen_server.html#c:handle_call/3"><code class="inline">:gen_server.handle_call/3</code></a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/gen_server.html#c:handle_call/3"><code class="inline">:gen_server.handle_call/3</code></a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "elixir type" do | ||
|
@@ -171,7 +171,7 @@ defmodule ExDoc.Language.ElixirTest do | |
|
||
test "erlang type" do | ||
assert autolink_doc("`t::array.array/0`") == | ||
~s|<a href="https://www.erlang.org/doc/man/array.html#t:array/0"><code class="inline">:array.array/0</code></a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/array.html#t:array/0"><code class="inline">:array.array/0</code></a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "special forms" do | ||
|
@@ -204,10 +204,10 @@ defmodule ExDoc.Language.ElixirTest do | |
~s|<a href="https://hexdocs.pm/elixir/String.html#at/2">custom text</a>| | ||
|
||
assert autolink_doc("[custom text](`:lists`)") == | ||
~s|<a href="https://www.erlang.org/doc/man/lists.html">custom text</a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/lists.html">custom text</a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
assert autolink_doc("[custom text](`:lists.all/2`)") == | ||
~s|<a href="https://www.erlang.org/doc/man/lists.html#all/2">custom text</a>| | ||
~s|<a href="https://www.erlang.org/doc/apps/stdlib/lists.html#all/2">custom text</a>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "mix task" do | ||
|
@@ -450,7 +450,7 @@ defmodule ExDoc.Language.ElixirTest do | |
|
||
test "Erlang stdlib types" do | ||
assert autolink_spec(quote(do: t() :: :sets.set())) == | ||
~s[t() :: <a href="https://www.erlang.org/doc/man/sets.html#t:set/0">:sets.set</a>()] | ||
~s[t() :: <a href="https://www.erlang.org/doc/apps/stdlib/sets.html#t:set/0">:sets.set</a>()] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end | ||
|
||
test "escape special HTML characters" do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ https://www.erlang.org/doc/apps/erts/erlang.html#t:atom/0