Skip to content

Commit 1e7a52c

Browse files
authored
Fix: markdown doc lines should wrap with \n\n (#663)
1 parent 8019589 commit 1e7a52c

File tree

1 file changed

+2
-2
lines changed
  • apps/language_server/lib/language_server/providers

1 file changed

+2
-2
lines changed

apps/language_server/lib/language_server/providers/hover.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
6767
end
6868

6969
defp add_hexdocs_link(markdown, subject, project_dir) do
70-
[hd | tail] = markdown |> String.split("\n\n")
70+
[hd | tail] = markdown |> String.split("\n\n", parts: 2)
7171

7272
link = hexdocs_link(hd, subject, project_dir)
7373

@@ -76,7 +76,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
7676
markdown
7777

7878
_ ->
79-
hd <> " [view on hexdocs](#{link})\n\n" <> Enum.join(tail, "")
79+
["#{hd} [view on hexdocs](#{link})" | tail] |> Enum.join("\n\n")
8080
end
8181
end
8282

0 commit comments

Comments
 (0)