diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-13 17:42:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-13 17:42:38 +0800 |
commit | 920f252f0ea57615600258b301917e6b3fab0bdc (patch) | |
tree | 8afe4598628fc7ce24a4517b7eb7901537d59d8d | |
parent | fe5d329c4787fde7a8fec0e9f092537eb439a3b3 (diff) | |
download | lua-language-server-920f252f0ea57615600258b301917e6b3fab0bdc.zip |
reslove #537
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/markdown.lua | 3 | ||||
-rw-r--r-- | test/crossfile/hover.lua | 1 |
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 |