From be347f67dc24c2a726b06e4ab93733eb771eb690 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 30 Jan 2023 10:35:38 -0500 Subject: [PATCH] LibJS: Shorten some spec text for BestAvailableLocale This is an editorial change in the Intl.NumberFormat V3 spec. See: https://github.com/tc39/proposal-intl-numberformat-v3/commit/654bfad --- Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp index 9901b6a40c..3fb00376a8 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp @@ -264,6 +264,7 @@ ThrowCompletionOr> canonicalize_locale_list(VM& vm, Value locales } // 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 best_available_locale(StringView locale) { // 1. Let candidate be locale. @@ -271,7 +272,7 @@ Optional best_available_locale(StringView locale) // 2. Repeat, 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)) return candidate;