summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-11 16:57:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-11 16:57:21 +0800
commite1912470260bac17e7efc565cb59719beb810d01 (patch)
tree712057774af3b500a021704a1b328923af0b76a0 /script/parser/luadoc.lua
parente82c09fd0b06e8d4ca872759fb6bb4d50506dd6a (diff)
downloadlua-language-server-e1912470260bac17e7efc565cb59719beb810d01.zip
fix #1608
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index d5ac93bb..58f70028 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -768,7 +768,7 @@ function parseType(parent)
if comments then
resume.comment = table.concat(comments, '\n')
else
- resume.comment = nextComm.text:match('#%s*(.+)', #resumeHead + 1)
+ resume.comment = nextComm.text:match('%s*#?%s*(.+)', resume.finish - nextComm.start)
end
result.types[#result.types+1] = resume
result.finish = resume.finish