Skip to content

Commit dd9cd6b

Browse files
committed
fix #1593
1 parent d139613 commit dd9cd6b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
1717
}
1818
```
1919
* `CHG` [#1177] re-support for symlinks, users need to maintain the correctness of symlinks themselves
20+
* `FIX` [#1593]
2021

2122
[#1177]: https://github.com/sumneko/lua-language-server/issues/1177
2223
[#1458]: https://github.com/sumneko/lua-language-server/issues/1458
2324
[#1557]: https://github.com/sumneko/lua-language-server/issues/1557
2425
[#1558]: https://github.com/sumneko/lua-language-server/issues/1558
26+
[#1593]: https://github.com/sumneko/lua-language-server/issues/1593
2527

2628
## 3.5.6
2729
`2022-9-16`

script/parser/luadoc.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,10 +1494,14 @@ local function buildLuaDoc(comment)
14941494
comment = comment,
14951495
}
14961496
end
1497+
local startOffset = comment.start
1498+
if comment.type == 'comment.long' then
1499+
startOffset = startOffset + #comment.mark - 2
1500+
end
14971501

14981502
local doc = text:sub(startPos)
14991503

1500-
parseTokens(doc, comment.start + startPos)
1504+
parseTokens(doc, startOffset + startPos)
15011505
local result, rests = convertTokens(doc)
15021506
if result then
15031507
result.range = comment.finish

0 commit comments

Comments
 (0)