}
}
// A space in the userinfo (e.g. "dep missing: @test/") isn't real credentials,
// so treat it as not-a-URL — unless an explicit http(s) scheme is present,
// which wins. Deliberately placed *after* the IPv4/IPv6 returns above:
// Chromium's `AutocompleteInput::Parse` classifies IP-literal hosts as URL
// `user name@[::1]` stay URLs.
if (userinfo !== undefined && /\s/.test(userinfo) && !isHttpScheme) {
return 'unknown';