diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-09-28 21:15:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-09-28 21:15:19 +0800 |
commit | dd9cd6b2fcf96b3ef30572b32e237598f6b813f4 (patch) | |
tree | e35adda249dd2a8c596fba5be2463e920e434be0 /script/parser/luadoc.lua | |
parent | d1396130effb609f03710ace73f2c65eeabd145a (diff) | |
download | lua-language-server-dd9cd6b2fcf96b3ef30572b32e237598f6b813f4.zip |
fix #1593
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 176d6f03..d5ac93bb 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1494,10 +1494,14 @@ local function buildLuaDoc(comment) comment = comment, } end + local startOffset = comment.start + if comment.type == 'comment.long' then + startOffset = startOffset + #comment.mark - 2 + end local doc = text:sub(startPos) - parseTokens(doc, comment.start + startPos) + parseTokens(doc, startOffset + startPos) local result, rests = convertTokens(doc) if result then result.range = comment.finish |