1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Fixes hard-to-read code indentation

This commit is contained in:
nnposter
2017-04-01 21:11:47 +00:00
parent 917c988baa
commit 5636767c85

View File

@@ -182,14 +182,14 @@ function parse(url, default)
local authority = parsed.authority local authority = parsed.authority
if not authority then return parsed end if not authority then return parsed end
authority = string.gsub(authority,"^([^@]*)@", authority = string.gsub(authority,"^([^@]*)@",
function(u) parsed.userinfo = u; return "" end) function(u) parsed.userinfo = u; return "" end)
authority = string.gsub(authority, ":([0-9]*)$", authority = string.gsub(authority, ":([0-9]*)$",
function(p) if p ~= "" then parsed.port = p end; return "" end) function(p) if p ~= "" then parsed.port = p end; return "" end)
if authority ~= "" then parsed.host = authority end if authority ~= "" then parsed.host = authority end
local userinfo = parsed.userinfo local userinfo = parsed.userinfo
if not userinfo then return parsed end if not userinfo then return parsed end
userinfo = string.gsub(userinfo, ":([^:]*)$", userinfo = string.gsub(userinfo, ":([^:]*)$",
function(p) parsed.password = p; return "" end) function(p) parsed.password = p; return "" end)
parsed.user = userinfo parsed.user = userinfo
return parsed return parsed
end end