Fix station search bug

When writing "cala" in order to search for "Călărași", it wouldn't work
because only the first ă was replaced with a.
This commit is contained in:
Kenneth Bruen 2022-11-15 21:18:52 +01:00
parent 6e4b6a609a
commit 1fb1153f13
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1

View file

@ -11,11 +11,11 @@ function goToStation(station) {
function searchNormalize(str) {
return str
.toLowerCase()
.replace('ă', 'a')
.replace('â', 'a')
.replace('î', 'i')
.replace('ș', 's')
.replace('ț', 't')
.replaceAll('ă', 'a')
.replaceAll('â', 'a')
.replaceAll('î', 'i')
.replaceAll('ș', 's')
.replaceAll('ț', 't')
}
var focusedElement = null