summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/provider/markdown.lua3
-rw-r--r--test/crossfile/hover.lua19
3 files changed, 20 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 5b58f21b..30dabd47 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,7 @@
# changelog
## 2.4.2
+* `FIX` [#706](https://github.com/sumneko/lua-language-server/issues/706)
* `FIX` [#707](https://github.com/sumneko/lua-language-server/issues/707)
* `FIX` [#709](https://github.com/sumneko/lua-language-server/issues/709)
diff --git a/script/provider/markdown.lua b/script/provider/markdown.lua
index 3a215f0f..213c417d 100644
--- a/script/provider/markdown.lua
+++ b/script/provider/markdown.lua
@@ -23,9 +23,6 @@ function mt:add(language, text)
}
else
text = tostring(text)
- if #text == 0 then
- return
- end
self[#self+1] = {
type = 'text',
language = language,
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index 13e5e5c0..b1c4c804 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -999,3 +999,22 @@ local x: number
---
aaa]]}
+
+TEST {{ path = 'a.lua', content = '', }, {
+ path = 'b.lua',
+ content = [[
+---line1
+---
+---line2
+local function <?fn?>() end
+]]
+},
+hover = [[
+```lua
+function fn()
+```
+
+---
+line1
+
+line2]]}