« get me outta code hell

fix improper sorting for specials before whitespace - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-11-27 00:48:44 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-11-27 00:48:44 -0400
commitb83797b525d70072c02aa0b201a4863df2447f48 (patch)
tree8073906fddf2189b52f2a1ad4d321fa93a942032
parentdd8943ea8cfb086f4b6a5e1057998faacc564bf6 (diff)
fix improper sorting for specials before whitespace
-rw-r--r--src/util/wiki-data.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js
index f044b2a1..8fb62db0 100644
--- a/src/util/wiki-data.js
+++ b/src/util/wiki-data.js
@@ -109,7 +109,7 @@ export function normalizeName(s) {
     .trim();
 
   // Discard anything that isn't a letter, number, or space.
-  s = s.replace(/[^\p{Letter}\p{Number} ]/gu, '');
+  s = s.replace(/[^\p{Letter}\p{Number} ]/gu, '').trim();
 
   // Remove common English (only, for now) prefixes.
   s = s.replace(/^(?:an?|the) /i, '');