From b83797b525d70072c02aa0b201a4863df2447f48 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 27 Nov 2022 00:48:44 -0400 Subject: fix improper sorting for specials before whitespace --- src/util/wiki-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') 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, ''); -- cgit 1.3.0-6-gf8a5