File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 3
3
## Unreleased
4
4
<!-- Add all new changes here. They will be moved under a version at release -->
5
5
* ` FIX ` incorrect argument skip pattern for ` --check_out_path= ` , which incorrectly skips the next argument
6
+ * ` FIX ` incorrect file names in file doc.json
6
7
7
8
## 3.13.6
8
9
` 2025-2-6 `
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ local getLabel = require 'core.hover.label'
8
8
local jsonb = require ' json-beautify'
9
9
local util = require ' utility'
10
10
local markdown = require ' provider.markdown'
11
+ local fs = require ' bee.filesystem'
12
+ local furi = require ' file-uri'
11
13
12
14
--- @alias doctype
13
15
--- | ' doc.alias'
@@ -55,13 +57,12 @@ local markdown = require 'provider.markdown'
55
57
local export = {}
56
58
57
59
function export .getLocalPath (uri )
58
- -- remove uri root (and prefix)
59
- local local_file_uri = uri
60
- local i , j = local_file_uri :find (DOC )
61
- if not j then
62
- return ' [FOREIGN] ' .. uri
60
+ local relativePath = fs .relative (furi .decode (uri ), DOC ):string ()
61
+ if relativePath :sub (1 , 2 ) == ' ..' then
62
+ -- not under project directory
63
+ return ' [FOREIGN] ' .. uri
63
64
end
64
- return local_file_uri : sub ( j + 1 )
65
+ return relativePath
65
66
end
66
67
67
68
function export .positionOf (rowcol )
You can’t perform that action at this time.
0 commit comments