Thanks to xet7 !

Fixes #5782
This commit is contained in:
Lauri Ojansivu 2025-05-25 00:22:47 +03:00
parent 1979b1692d
commit aaa5f9885d
3 changed files with 7 additions and 23 deletions

View file

@ -11,17 +11,6 @@ Utils = {
currentBoard.setColor(currentBoard["background-color"]);
}
},
// Normalize non-Western (Persian/Arabic) digits to Western Arabic (0-9)
// This helps with date parsing in non-English languages
normalizeDigits(str) {
if (!str) return str;
const persian = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
const arabic = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
for (let i = 0; i < 10; i++) {
str = str.replace(persian[i], i).replace(arabic[i], i);
}
return str;
},
/** returns the current board id
* <li> returns the current board id or the board id of the popup card if set
*/