summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-05 11:58:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-05 11:58:14 +0800
commit5eb5ae64e5d36fb851ddc7ffbfa0d53d628581b6 (patch)
treeaef9245b8c17976af0078d4ea51b2f29a354eada /script/core
parente39fba474ab432265c9af4a66e2a1764cd0ca1d3 (diff)
downloadlua-language-server-5eb5ae64e5d36fb851ddc7ffbfa0d53d628581b6.zip
fix
Diffstat (limited to 'script/core')
-rw-r--r--script/core/hover/description.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index cd24b013..ddb84770 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -205,7 +205,11 @@ local function getFunctionComment(source)
local comments = {}
for _, doc in ipairs(docGroup) do
if doc.type == 'doc.comment' then
- comments[#comments+1] = doc.comment.text:sub(2)
+ if doc.comment.text:sub(1, 1) == '-' then
+ comments[#comments+1] = doc.comment.text:sub(2)
+ else
+ comments[#comments+1] = doc.comment.text
+ end
elseif doc.type == 'doc.param' then
if doc.comment then
comments[#comments+1] = ('@*param* `%s` — %s'):format(