mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 08:07:39 +00:00
LibJS: Shorten some spec text for BestAvailableLocale
This is an editorial change in the Intl.NumberFormat V3 spec. See:
654bfad
This commit is contained in:
parent
4475f21e9e
commit
be347f67dc
1 changed files with 2 additions and 1 deletions
|
@ -264,6 +264,7 @@ ThrowCompletionOr<Vector<String>> canonicalize_locale_list(VM& vm, Value locales
|
||||||
}
|
}
|
||||||
|
|
||||||
// 9.2.2 BestAvailableLocale ( availableLocales, locale ), https://tc39.es/ecma402/#sec-bestavailablelocale
|
// 9.2.2 BestAvailableLocale ( availableLocales, locale ), https://tc39.es/ecma402/#sec-bestavailablelocale
|
||||||
|
// 1.2.2 BestAvailableLocale ( availableLocales, locale ), https://tc39.es/proposal-intl-numberformat-v3/out/negotiation/proposed.html#sec-bestavailablelocale
|
||||||
Optional<StringView> best_available_locale(StringView locale)
|
Optional<StringView> best_available_locale(StringView locale)
|
||||||
{
|
{
|
||||||
// 1. Let candidate be locale.
|
// 1. Let candidate be locale.
|
||||||
|
@ -271,7 +272,7 @@ Optional<StringView> best_available_locale(StringView locale)
|
||||||
|
|
||||||
// 2. Repeat,
|
// 2. Repeat,
|
||||||
while (true) {
|
while (true) {
|
||||||
// a. If availableLocales contains an element equal to candidate, return candidate.
|
// a. If availableLocales contains candidate, return candidate.
|
||||||
if (::Locale::is_locale_available(candidate))
|
if (::Locale::is_locale_available(candidate))
|
||||||
return candidate;
|
return candidate;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue