summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/provider/markdown.lua3
-rw-r--r--test/crossfile/hover.lua1
3 files changed, 5 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index f7ec7aac..f51596e3 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,7 @@
## 1.21.2
* `FIX` loaded new file with ignored filename
* `FIX` [#536](https://github.com/sumneko/lua-language-server/issues/536)
+* `FIX` [#537](https://github.com/sumneko/lua-language-server/issues/537)
## 1.21.1
`2021-5-8`
diff --git a/script/provider/markdown.lua b/script/provider/markdown.lua
index ceaedfdb..3b4a2be1 100644
--- a/script/provider/markdown.lua
+++ b/script/provider/markdown.lua
@@ -29,6 +29,9 @@ function mt:add(language, text)
end
self[#self+1] = text
else
+ if #self > 0 then
+ self[#self+1] = ''
+ end
self[#self+1] = ('```%s\n%s\n```'):format(language, text)
end
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index bf56b39a..c27cd3dd 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -623,6 +623,7 @@ hover = {
name = 'f',
description = [[
@*param* `a` — xxx
+
```lua
a: boolean
| true -- ttt