Skip to content

Commit

Permalink
Fix: markdown doc lines should wrap with \n\n (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlindingDark authored Jan 24, 2022
1 parent 8019589 commit 1e7a52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/language_server/lib/language_server/providers/hover.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
end

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

link = hexdocs_link(hd, subject, project_dir)

Expand All @@ -76,7 +76,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
markdown

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

Expand Down

0 comments on commit 1e7a52c

Please sign in to comment.