diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/workspace.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua index 895a2680..9d341cdd 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -331,10 +331,11 @@ function mt:convertPathAsRequire(filename, start) end function mt:matchPath(baseUri, input) - local first = input:match '[^%.]+' + local first = input:match '^[^%.]+' if not first then return nil end + first = first:gsub('%W', '%%%1') local baseName = getFileName(uric.decode(baseUri)) local rootLen = #self.root:string() local map = {} |