Skip to content

Commit

Permalink
fix(hover): ignore invalid markup. Fixes #819
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 16, 2024
1 parent d3d8329 commit 59e633f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lua/noice/lsp/format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ function M.format_markdown(contents)
table.insert(parts, ("```\n%s\n```"):format(content.value))
elseif Util.islist(content) then
vim.list_extend(parts, M.format_markdown(content))
elseif type(content) == "table" and next(content) == nil then
goto continue
else
error("Unknown markup " .. vim.inspect(content))
end
::continue::
-- ignore other types of content (invalid content)
end

return vim.split(table.concat(parts, "\n"), "\n")
Expand Down

0 comments on commit 59e633f

Please sign in to comment.