Member list: also sort names with Unicode roman numerals (e.g. Ⅸ, Ⅻ)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-22 10:09:16 +02:00
parent 7c0ffccbd2
commit ea3e372131

View file

@ -39,6 +39,8 @@
}
function nameNumber(name) {
// Unicode-Ziffern wie "Ⅸ" oder "Ⅻ" (ein Zeichen) in normale Buchstaben umwandeln ("IX", "XII")
name = String(name).normalize('NFKC').toLowerCase();
var match = /^[#\s]*(\d+|[ivxlcdm]+)\s*[|\-–—:.·/]/.exec(name);
if (!match) return null;
return /^\d+$/.test(match[1]) ? parseInt(match[1], 10) : romanValue(match[1]);