diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-10-08 19:08:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-10-08 19:08:39 +0800 |
commit | bc3976210d46fc7187a00930b6761abad60cc967 (patch) | |
tree | 67926f3a242a575bbf40a7e7d43d77662afd8c47 | |
parent | 896e4b9796ab5c9d3943640f02114dccc48ba3dd (diff) | |
download | lua-language-server-bc3976210d46fc7187a00930b6761abad60cc967.zip |
fix #706
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/markdown.lua | 3 | ||||
-rw-r--r-- | test/crossfile/hover.lua | 19 |
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]]} |