summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-21 15:14:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-21 15:14:24 +0800
commitd59f9824a567aa1a18b5e0e794efdb2e658bbb35 (patch)
treec6519bfc9900d65d37dd32edc36c4b602f409c4f /script
parent61498917bb2d6686b97c6193b2f713f099faf769 (diff)
downloadlua-language-server-d59f9824a567aa1a18b5e0e794efdb2e658bbb35.zip
update occlusion path
Diffstat (limited to 'script')
-rw-r--r--script/service/telemetry.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua
index d1bf7680..e4e610e3 100644
--- a/script/service/telemetry.lua
+++ b/script/service/telemetry.lua
@@ -60,16 +60,16 @@ local function pushVersion(link)
end
local function occlusionPath(str)
- return str:gsub('[^"\r\n]+', function (chunk)
+ return str:gsub('(%s*)([^:"\r\n]+)', function (left, chunk)
if not chunk:find '[/\\]' then
return
end
local newStr, count = chunk:gsub('.+([/\\]script[/\\])', '***%1')
if count > 0 then
- return newStr
- elseif chunk:find '^%u:'
+ return left .. newStr
+ elseif chunk:sub(1, 1) == '\\'
or chunk:sub(1, 1) == '/' then
- return '***'
+ return left .. '***'
end
end)
end