Ignoring punctuation in SortableNames.compare results in unexpected sorting #7

Closed
opened 2024-10-03 21:12:22 +00:00 by ardouglass · 0 comments
ardouglass commented 2024-10-03 21:12:22 +00:00 (Migrated from github.com)

5e07814edb/src/sortable-names.ts (L372)

This was enabled to ensure sorting an array like ["D'arcy", "Darcy", "Darby"] would return as ["Darby", "D'arcy", "Darcy"] and not ["D'arcy", "Darby", "Darcy"].

This works with letter by letter sorting, but for a list of authors, people probably expect word by word sorting. For example, Dick, Philip K. should sort before Dickey, Eric Jerome.

https://github.com/ardouglass/sortable-names/blob/5e07814edb743c483869790429d099a0ab110789/src/sortable-names.ts#L372 This was enabled to ensure sorting an array like `["D'arcy", "Darcy", "Darby"]` would return as `["Darby", "D'arcy", "Darcy"]` and not `["D'arcy", "Darby", "Darcy"]`. This works with letter by letter sorting, but for a list of authors, people probably expect word by word sorting. For example, Dick, Philip K. should sort before Dickey, Eric Jerome.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ardouglass/sortable-names#7
No description provided.