mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Use alphanumeric sorting for completions (#57745)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user