We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8c9d7c commit d2555f1Copy full SHA for d2555f1
apps/language_server/lib/language_server/providers/hover.ex
@@ -214,11 +214,17 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
214
defp documentation_section(""), do: ""
215
216
defp documentation_section(docs) do
217
- """
218
- ### Documentation
+ if String.valid?(docs) do
+ """
219
+ ### Documentation
220
- #{MarkdownUtils.adjust_headings(docs, 3)}
221
+ #{MarkdownUtils.adjust_headings(docs, 3)}
222
223
+ else
224
+ # some people have weird docs that are not valid UTF-8
225
+ Logger.warning("Invalid docs for hover: #{inspect(docs)}")
226
+ ""
227
+ end
228
end
229
230
defp format_header(text) do
0 commit comments