File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 5
5
* ` FIX ` completion: interface in nested table
6
6
* ` FIX ` completion: interface not show after ` , `
7
7
* ` FIX ` [ #400 ] ( https://github.com/sumneko/lua-language-server/issues/400 )
8
+ * ` FIX ` [ #402 ] ( https://github.com/sumneko/lua-language-server/issues/402 )
8
9
* ` FIX ` runtime errors
9
10
10
11
## 1.16.0
Original file line number Diff line number Diff line change 39
39
local function convertLink (text )
40
40
local fmt = getDocFormater ()
41
41
return text :gsub (' %$([%.%w]+)' , function (name )
42
+ local lastDot = ' '
43
+ if name :sub (- 1 ) == ' .' then
44
+ name = name :sub (1 , - 2 )
45
+ lastDot = ' .'
46
+ end
42
47
if fmt then
43
- return (' [%s](%s)' ):format (name , lang .script (fmt , ' pdf-' .. name ))
48
+ return (' [%s](%s)' ):format (name , lang .script (fmt , ' pdf-' .. name )) .. lastDot
44
49
else
45
- return (' `%s`' ):format (name )
50
+ return (' `%s`' ):format (name ) .. lastDot
46
51
end
47
52
end ):gsub (' §([%.%w]+)' , function (name )
53
+ local lastDot = ' '
54
+ if name :sub (- 1 ) == ' .' then
55
+ name = name :sub (1 , - 2 )
56
+ lastDot = ' .'
57
+ end
48
58
if fmt then
49
- return (' [§%s](%s)' ):format (name , lang .script (fmt , name ))
59
+ return (' [§%s](%s)' ):format (name , lang .script (fmt , name )) .. lastDot
50
60
else
51
- return (' `%s`' ):format (name )
61
+ return (' `%s`' ):format (name ) .. lastDot
52
62
end
53
63
end )
54
64
end
@@ -59,6 +69,9 @@ local function createViewDocument(name)
59
69
return nil
60
70
end
61
71
name = name :match ' [%w_%.]+'
72
+ if name :sub (- 1 ) == ' .' then
73
+ name = name :sub (1 , - 2 )
74
+ end
62
75
return (' [%s](%s)' ):format (lang .script .HOVER_VIEW_DOCUMENTS , lang .script (fmt , ' pdf-' .. name ))
63
76
end
64
77
You can’t perform that action at this time.
0 commit comments