Fix Erlang documentation links (#2653)

This commit is contained in:
Jonatan Kłosko 2024-06-14 17:24:04 +02:00 committed by GitHub
parent 356bd4b976
commit a6bbed2440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -529,7 +529,7 @@ defmodule Livebook.Intellisense do
end
is_otp? =
case :code.which(app || module) do
case :code.which(module) do
:preloaded -> true
[_ | _] = path -> List.starts_with?(path, :code.lib_dir())
_ -> false

View file

@ -1574,6 +1574,11 @@ defmodule Livebook.IntellisenseTest do
Intellisense.get_details(":atomics.new", 11, context, node())
assert content =~ ~r"https://www.erlang.org/doc/man/atomics.html#new-2"
assert %{contents: [content]} =
Intellisense.get_details(":string.uppercase", 11, context, node())
assert content =~ ~r"https://www.erlang.org/doc/man/string.html#uppercase-1"
end
end