summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/workspace/workspace.lua1
-rw-r--r--script/workspace.lua1
2 files changed, 2 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)
diff --git a/script/workspace.lua b/script/workspace.lua
index 9bcaec64..d2699851 100644
--- a/script/workspace.lua
+++ b/script/workspace.lua
@@ -382,6 +382,7 @@ function mt:searchPath(baseUri, str)
return self.searched[baseUri][str]
end
str = str:gsub('%.', '/')
+ :gsub('%%', '%%%%')
local searchers = {}
for i, luapath in ipairs(config.config.runtime.path) do
searchers[i] = luapath:gsub('%?', str)