@@ -25,6 +25,7 @@ local function asStringInRequire(source, literal)
25
25
result = ws .findUrisByFilePath (literal )
26
26
end
27
27
if result and # result > 0 then
28
+ local shows = {}
28
29
for i , uri in ipairs (result ) do
29
30
local searcher = searchers and searchers [uri ]
30
31
uri = files .getOriginUri (uri )
@@ -34,19 +35,19 @@ local function asStringInRequire(source, literal)
34
35
end
35
36
path = path :gsub (' ^[/\\ ]*' , ' ' )
36
37
if vm .isMetaFile (uri ) then
37
- result [i ] = (' * [[meta]](%s)' ):format (uri )
38
+ shows [i ] = (' * [[meta]](%s)' ):format (uri )
38
39
elseif searcher then
39
40
searcher = searcher :sub (# rootPath + 1 )
40
41
searcher = ws .normalize (searcher )
41
42
searcher = searcher :gsub (' ^[/\\ ]+' , ' ' )
42
- result [i ] = (' * [%s](%s) %s' ):format (path , uri , lang .script (' HOVER_USE_LUA_PATH' , searcher ))
43
+ shows [i ] = (' * [%s](%s) %s' ):format (path , uri , lang .script (' HOVER_USE_LUA_PATH' , searcher ))
43
44
else
44
- result [i ] = (' * [%s](%s)' ):format (path , uri )
45
+ shows [i ] = (' * [%s](%s)' ):format (path , uri )
45
46
end
46
47
end
47
- table.sort (result )
48
+ table.sort (shows )
48
49
local md = markdown ()
49
- md :add (' md' , table.concat (result , ' \n ' ))
50
+ md :add (' md' , table.concat (shows , ' \n ' ))
50
51
return md :string ()
51
52
end
52
53
end
0 commit comments