summaryrefslogtreecommitdiff
path: root/script-beta/workspace/workspace.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-05 15:05:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-05 15:05:28 +0800
commita1ec2fe4db8f611f40eeea2fd4db51d49e6d71ad (patch)
tree8dd3387d326a18fa00ae28eba1d778b09e1a02b1 /script-beta/workspace/workspace.lua
parent977efc2804c840456edeac2af95ccf68f815d88e (diff)
downloadlua-language-server-a1ec2fe4db8f611f40eeea2fd4db51d49e6d71ad.zip
fix #206 修正require路径中包含 `%` 时的报错
Diffstat (limited to 'script-beta/workspace/workspace.lua')
-rw-r--r--script-beta/workspace/workspace.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua
index f24f825a..70f5616b 100644
--- a/script-beta/workspace/workspace.lua
+++ b/script-beta/workspace/workspace.lua
@@ -178,6 +178,7 @@ function m.findUrisByRequirePath(path, whole)
local results = {}
local mark = {}
local input = path:gsub('%.', '/')
+ :gsub('%%', '%%%%')
for _, luapath in ipairs(config.config.runtime.path) do
local part = luapath:gsub('%?', input)
local uris = m.findUrisByFilePath(part, whole)