mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-23 14:27:15 +08:00
Fix Erlang documentation links (#2653)
This commit is contained in:
parent
356bd4b976
commit
a6bbed2440
2 changed files with 6 additions and 1 deletions
|
@ -529,7 +529,7 @@ defmodule Livebook.Intellisense do
|
||||||
end
|
end
|
||||||
|
|
||||||
is_otp? =
|
is_otp? =
|
||||||
case :code.which(app || module) do
|
case :code.which(module) do
|
||||||
:preloaded -> true
|
:preloaded -> true
|
||||||
[_ | _] = path -> List.starts_with?(path, :code.lib_dir())
|
[_ | _] = path -> List.starts_with?(path, :code.lib_dir())
|
||||||
_ -> false
|
_ -> false
|
||||||
|
|
|
@ -1574,6 +1574,11 @@ defmodule Livebook.IntellisenseTest do
|
||||||
Intellisense.get_details(":atomics.new", 11, context, node())
|
Intellisense.get_details(":atomics.new", 11, context, node())
|
||||||
|
|
||||||
assert content =~ ~r"https://www.erlang.org/doc/man/atomics.html#new-2"
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue