Use package.hexdocs.pm URL format instead of hexdocs.pm/package (#15429)

This commit is contained in:
Jonatan Männchen
2026-05-30 22:19:31 +02:00
committed by GitHub
parent 8ac03ec3b7
commit b5f1864d4e
19 changed files with 44 additions and 40 deletions
+2 -2
View File
@@ -1248,12 +1248,12 @@ format_error({invalid_expr_in_scope, Scope, Kind}) ->
format_error({invalid_expr_in_guard, Kind}) ->
Message =
"invalid expression in guards, ~ts is not allowed in guards. To learn more about "
"guards, visit: https://hexdocs.pm/elixir/patterns-and-guards.html#guards",
"guards, visit: https://elixir.hexdocs.pm/patterns-and-guards.html#guards",
io_lib:format(Message, [Kind]);
format_error({invalid_expr_in_bitsize, Kind}) ->
Message =
"~ts is not allowed inside a bitstring size specifier. The size specifier in matches works like guards. "
"To learn more about guards, visit: https://hexdocs.pm/elixir/patterns-and-guards.html#guards",
"To learn more about guards, visit: https://elixir.hexdocs.pm/patterns-and-guards.html#guards",
io_lib:format(Message, [Kind]);
format_error({invalid_alias, Expr}) ->
Message =
+3 -3
View File
@@ -1406,7 +1406,7 @@ tokenize_identifier(String, Line, Column, Scope, MaybeKeyword) ->
case suggest_simpler_unexpected_token_in_error(Wrong, Line, WrongColumn, Scope) of
no_suggestion ->
%% we append a pointer to more info if we aren't appending a suggestion
MoreInfo = "\nSee https://hexdocs.pm/elixir/unicode-syntax.html for more information.",
MoreInfo = "\nSee https://elixir.hexdocs.pm/unicode-syntax.html for more information.",
{error, {?LOC(Line, Column), {Prefix, Suffix ++ MoreInfo}, Wrong}};
{_, {Location, _, SuggestionMessage}} = _SuggestionError ->
@@ -1443,7 +1443,7 @@ suggest_simpler_unexpected_token_in_error(Wrong, Line, WrongColumn, Scope) ->
Wrong,
"You could write the above in a similar way that is accepted by Elixir:",
Simpler,
"See https://hexdocs.pm/elixir/unicode-syntax.html for more information."),
"See https://elixir.hexdocs.pm/unicode-syntax.html for more information."),
{error, {?LOC(Line, WrongColumn), "unexpected token: ", Message}};
_other ->
no_suggestion
@@ -1453,7 +1453,7 @@ suggest_simpler_unexpected_token_in_error(Wrong, Line, WrongColumn, Scope) ->
Wrong,
"You could write the above in a compatible format that is accepted by Elixir:",
NFKC,
"See https://hexdocs.pm/elixir/unicode-syntax.html for more information."),
"See https://elixir.hexdocs.pm/unicode-syntax.html for more information."),
{error, {?LOC(Line, WrongColumn), "unexpected token: ", Message}}
end.