fix: Add "numeric" option to localecompare (#6520)

Fixes #6493
This commit is contained in:
Lars Eggert 2023-10-23 22:08:56 +02:00 committed by GitHub
parent 0e46ca4638
commit 3bfe90e755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,8 @@ function text_sort(a, b, options) {
// sort by text content
return prep(a, options).localeCompare(prep(b, options), "en", {
sensitivity: "base",
ignorePunctuation: true
ignorePunctuation: true,
numeric: true
});
}