From 2e281b51a28b4048830b4a6b31b55ad36fe7c4d9 Mon Sep 17 00:00:00 2001 From: Zhong Lufan Date: Fri, 21 Oct 2022 04:32:22 +0800 Subject: [PATCH] fix: urls without slashes not recognized as urls (#336) --- scripts/uosc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/uosc.lua b/scripts/uosc.lua index 1d645d4..c9587fd 100644 --- a/scripts/uosc.lua +++ b/scripts/uosc.lua @@ -738,7 +738,7 @@ end -- Check if path is a protocol, such as `http://...` ---@param path string function is_protocol(path) - return type(path) == 'string' and path:match('^%a[%a%d-_]+://') ~= nil + return type(path) == 'string' and (path:match('^%a[%a%d-_]+://') ~= nil or path:match('^%a[%a%d-_]+:\\?') ~= nil) end ---@param path string