mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
AK: Rename URLParser:parse_host()
param is_not_special to is_opaque
Since the spec renamed it to make it easier to read.
This commit is contained in:
parent
c087ba24b9
commit
001abbcd66
1 changed files with 3 additions and 3 deletions
|
@ -558,7 +558,7 @@ static bool ends_in_a_number_checker(StringView input)
|
||||||
|
|
||||||
// https://url.spec.whatwg.org/#concept-host-parser
|
// https://url.spec.whatwg.org/#concept-host-parser
|
||||||
// NOTE: This is a very bare-bones implementation.
|
// NOTE: This is a very bare-bones implementation.
|
||||||
static Optional<URL::Host> parse_host(StringView input, bool is_not_special = false)
|
static Optional<URL::Host> parse_host(StringView input, bool is_opaque = false)
|
||||||
{
|
{
|
||||||
// 1. If input starts with U+005B ([), then:
|
// 1. If input starts with U+005B ([), then:
|
||||||
if (input.starts_with('[')) {
|
if (input.starts_with('[')) {
|
||||||
|
@ -575,8 +575,8 @@ static Optional<URL::Host> parse_host(StringView input, bool is_not_special = fa
|
||||||
return address.release_value();
|
return address.release_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. If isNotSpecial is true, then return the result of opaque-host parsing input.
|
// 2. If isOpaque is true, then return the result of opaque-host parsing input.
|
||||||
if (is_not_special)
|
if (is_opaque)
|
||||||
return parse_opaque_host(input);
|
return parse_opaque_host(input);
|
||||||
|
|
||||||
// 3. Assert: input is not the empty string.
|
// 3. Assert: input is not the empty string.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue