File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1313 ```
1414* ` NEW ` Test CLI: ` --name=<testname> ` ` -n=<testname> ` : run specify unit test
1515* ` FIX ` Fixed the error that the configuration file pointed to by the ` --configpath ` option was not read and loaded.
16+ * ` FIX ` Fixed the start position of the comment first symbol in docs ` ---@param a string?Comment ` - now its ` Comment ` instead of ` omment ` .
1617
1718## 3.13.5
1819` 2024-12-20 `
Original file line number Diff line number Diff line change @@ -1743,11 +1743,15 @@ local function buildLuaDoc(comment)
17431743 finish = rest .firstFinish or result .finish
17441744 end
17451745 end
1746- local cstart = text :find (' %S' , finish - comment .start )
1747- if cstart and cstart < comment .finish then
1746+ -- the subtraction is the length of the skipped string, so the start position is `+ 1`
1747+ local cpos = finish - comment .start + 1
1748+ -- actual text start is `comment.start + 2` because of `--` for some reason
1749+ local textOffset = 2
1750+ local cstart = text :find (' %S' , cpos - textOffset )
1751+ if cstart and cstart < comment .finish - textOffset then
17481752 result .comment = {
17491753 type = ' doc.tailcomment' ,
1750- start = cstart + comment . start ,
1754+ start = comment . start + cstart - 1 + textOffset ,
17511755 finish = comment .finish ,
17521756 parent = result ,
17531757 text = trimTailComment (text :sub (cstart )),
You can’t perform that action at this time.
0 commit comments