Use alphanumeric sorting for completions (#57745)

This commit is contained in:
Ryan Cavanaugh
2024-03-12 11:19:33 -07:00
committed by GitHub
parent e66049084b
commit 47a800f5a4
54 changed files with 62397 additions and 62397 deletions

View File

@@ -2252,7 +2252,7 @@ const createUIStringComparer = (() => {
function createIntlCollatorStringComparer(locale: string | undefined): Comparer<string> {
// Intl.Collator.prototype.compare is bound to the collator. See NOTE in
// http://www.ecma-international.org/ecma-402/2.0/#sec-Intl.Collator.prototype.compare
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant", numeric: true }).compare;
return (a, b) => compareWithCallback(a, b, comparer);
}
})();