mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
LSP/hover: Do not throw away contents if first line is empty (#11939)
haskell-ide-engine sends `hover` payloads as follows: { contents = { kind = "markdown", value = "\n```haskell\nfoo :: Either String (Integer, Text)\n```\n`foo` *local*" }, range = { end = { character = 5, line = 57 }, start = { character = 2, line = 57 } } } `value` starts with `\n`. The logic in `convert_input_to_markdown_lines` threw away the whole information.
This commit is contained in:

committed by
GitHub

parent
ad745f9da2
commit
cb8b9428ca
@@ -269,7 +269,7 @@ function M.convert_input_to_markdown_lines(input, contents)
|
||||
end
|
||||
end
|
||||
end
|
||||
if contents[1] == '' or contents[1] == nil then
|
||||
if (contents[1] == '' or contents[1] == nil) and #contents == 1 then
|
||||
return {}
|
||||
end
|
||||
return contents
|
||||
|
Reference in New Issue
Block a user