Skip to content

Commit

Permalink
Update documentation links to reflect new format
Browse files Browse the repository at this point in the history
Summary:
The OTP team recently changed the URL format for Erlang/OTP function documentation from:

https://www.erlang.org/doc/apps/stdlib/string.html#left-2

To:

https://www.erlang.org/doc/apps/stdlib/string.html#left/2

Update ELP accordingly.

Reviewed By: alanz

Differential Revision: D59467163

fbshipit-source-id: 0b3c69bb3422fc3f2eace2b301dc2a3c11ec47db
  • Loading branch information
robertoaloi authored and facebook-github-bot committed Jul 8, 2024
1 parent 773b00a commit 83c3c7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ide/src/doc_links/otp_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(crate) fn links(res: &mut Vec<DocLink>, sema: &Semantic, def: &SymbolDefinit
let function_arity = function_def.name.arity();
let title = format!("{module_name}:{function_name}/{function_arity}");
let uri = format!(
"{}/doc/man/{}.html#{}-{}",
"{}/doc/man/{}.html#{}/{}",
OTP_BASE_URL, module_name, function_name, function_arity
);
let link = DocLink { title, uri };
Expand Down Expand Up @@ -101,7 +101,7 @@ mod tests {
a() ->
lists:rev~erse([]).
"#,
vec!["https://erlang.org/doc/man/lists.html#reverse-1"],
vec!["https://erlang.org/doc/man/lists.html#reverse/1"],
)
}

Expand Down

0 comments on commit 83c3c7c

Please sign in to comment.