« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 5e9e6f9..8945ce0 100644
--- a/ui.js
+++ b/ui.js
@@ -1571,7 +1571,10 @@ class AppElement extends FocusElement {
       } else if (order === 'alphabetic') {
         item = {
           name: `${oldName} (alphabetic)`,
-          items: orderBy(flattenGrouplike(item).items, getNameWithoutTrackNumber)
+          items: orderBy(
+            flattenGrouplike(item).items,
+            t => getNameWithoutTrackNumber(t).replace(/[^a-zA-Z0-9]/g, '')
+          )
         }
       }
     } else {