refactor: Address issues raised by linter
This commit is contained in:
parent
480c052572
commit
601ad8d59f
21 changed files with 187 additions and 198 deletions
|
@ -179,9 +179,9 @@ function _M.parse(url, default)
|
|||
function(u) parsed.userinfo = u; return "" end)
|
||||
authority = string.gsub(authority, ":([^:%]]*)$",
|
||||
function(p) parsed.port = p; return "" end)
|
||||
if authority ~= "" then
|
||||
if authority ~= "" then
|
||||
-- IPv6?
|
||||
parsed.host = string.match(authority, "^%[(.+)%]$") or authority
|
||||
parsed.host = string.match(authority, "^%[(.+)%]$") or authority
|
||||
end
|
||||
local userinfo = parsed.userinfo
|
||||
if not userinfo then return parsed end
|
||||
|
@ -264,7 +264,7 @@ function _M.absolute(base_url, relative_url)
|
|||
relative_parsed.query = base_parsed.query
|
||||
end
|
||||
end
|
||||
else
|
||||
else
|
||||
relative_parsed.path = absolute_path(base_parsed.path or "",
|
||||
relative_parsed.path)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue