mirror of
https://codeberg.org/kbruen/kai.infotren.git
synced 2025-02-22 17:19:37 +02:00
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:
parent
6e4b6a609a
commit
1fb1153f13
1 changed files with 5 additions and 5 deletions
10
station.js
10
station.js
|
@ -11,11 +11,11 @@ function goToStation(station) {
|
||||||
function searchNormalize(str) {
|
function searchNormalize(str) {
|
||||||
return str
|
return str
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace('ă', 'a')
|
.replaceAll('ă', 'a')
|
||||||
.replace('â', 'a')
|
.replaceAll('â', 'a')
|
||||||
.replace('î', 'i')
|
.replaceAll('î', 'i')
|
||||||
.replace('ș', 's')
|
.replaceAll('ș', 's')
|
||||||
.replace('ț', 't')
|
.replaceAll('ț', 't')
|
||||||
}
|
}
|
||||||
|
|
||||||
var focusedElement = null
|
var focusedElement = null
|
||||||
|
|
Loading…
Add table
Reference in a new issue