aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorFolke Lemaitre <folke.lemaitre@gmail.com>2021-07-05 00:39:46 +0200
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-14 13:15:38 +0100
commit2ae4c96d9176de307822d5e93f3aca4496beeaa1 (patch)
tree4f10beb043b3a071d53886410f47381d913b076b /runtime/lua/vim
parentae89330ec0479cfa9eaaa2b64d8164e3309a1fea (diff)
downloadrneovim-2ae4c96d9176de307822d5e93f3aca4496beeaa1.tar.gz
rneovim-2ae4c96d9176de307822d5e93f3aca4496beeaa1.tar.bz2
rneovim-2ae4c96d9176de307822d5e93f3aca4496beeaa1.zip
backport: fix(lsp): prevent double <text> for cached plaintext markup
Diffstat (limited to 'runtime/lua/vim')
-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 :(