Skip to content

Commit b6eff58

Browse files
committed
fix
1 parent eb37453 commit b6eff58

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

script/core/hover/description.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ local function normalizeComment(comment, suri)
9797
return nil
9898
end
9999
comment = comment:gsub('(%[.-%]%()(.-)(%))', function (left, path, right)
100-
if furi.split(path) then
100+
local scheme = furi.split(path)
101+
if scheme
102+
-- strange way to check `C:/xxx.lua`
103+
and #scheme > 1 then
101104
return
102105
end
103106
local absPath = ws.getAbsolutePath(suri:gsub('/[^/]+$', ''), path)

test/crossfile/hover.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,3 +1343,20 @@ local n: unknown
13431343
---
13441344
[here](file:///d%3A/x.lua)]]
13451345
}
1346+
1347+
TEST {
1348+
{
1349+
path = 'a.lua',
1350+
content = [[
1351+
--[here](command:xxxxx)
1352+
local <?n?>
1353+
]]
1354+
},
1355+
hover = [[
1356+
```lua
1357+
local n: unknown
1358+
```
1359+
1360+
---
1361+
[here](command:xxxxx)]]
1362+
}

0 commit comments

Comments
 (0)