fix: urls without slashes not recognized as urls (#336)
This commit is contained in:
@@ -738,7 +738,7 @@ end
|
|||||||
-- Check if path is a protocol, such as `http://...`
|
-- Check if path is a protocol, such as `http://...`
|
||||||
---@param path string
|
---@param path string
|
||||||
function is_protocol(path)
|
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
|
end
|
||||||
|
|
||||||
---@param path string
|
---@param path string
|
||||||
|
Reference in New Issue
Block a user