aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorFolke Lemaitre <folke.lemaitre@gmail.com>2021-07-05 00:39:46 +0200
committerFolke Lemaitre <folke.lemaitre@gmail.com>2021-07-05 00:39:46 +0200
commit910967e5afff3cb2b9719d2eef0e37ba25040992 (patch)
tree5dc5ae65032545dc8f225f3fbee64025917416c5 /runtime/lua/vim/lsp/util.lua
parentc6226bd6c9068fae3afc1e7a31ff3fdd9ed3649a (diff)
downloadrneovim-910967e5afff3cb2b9719d2eef0e37ba25040992.tar.gz
rneovim-910967e5afff3cb2b9719d2eef0e37ba25040992.tar.bz2
rneovim-910967e5afff3cb2b9719d2eef0e37ba25040992.zip
fix(lsp): prevent double <text> for cached plaintext markup
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 195e3a0e65..06afc2c5e2 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -810,16 +810,16 @@ function M.convert_input_to_markdown_lines(input, contents)
-- If it's plaintext, then wrap it in a <text></text> block
-- Some servers send input.value as empty, so let's ignore this :(
- input.value = input.value or ''
+ local value = input.value or ''
if input.kind == "plaintext" then
-- wrap this in a <text></text> block so that stylize_markdown
-- can properly process it as plaintext
- input.value = string.format("<text>\n%s\n</text>", input.value or "")
+ value = string.format("<text>\n%s\n</text>", value)
end
- -- assert(type(input.value) == 'string')
- list_extend(contents, split_lines(input.value))
+ -- assert(type(value) == 'string')
+ list_extend(contents, split_lines(value))
-- MarkupString variation 2
elseif input.language then
-- Some servers send input.value as empty, so let's ignore this :(