Explorar o código

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
Timothy Flynn %!s(int64=2) %!d(string=hai) anos
pai
achega
be347f67dc

+ 2 - 1
Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp

@@ -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;