Added commentts

This commit is contained in:
gbubemismith 2022-05-25 00:23:08 +01:00
parent a2c4a8fdda
commit bd46e7a5f6
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ export class SearchBarService {
this.updateState();
}
// Remove accents/diacritics characters from text. This regex is equivalent to the Diacritic unicode property escape, i.e. it will match all diacritic characters.
setSearchText(value: string) {
this.searchText.next(value?.normalize("NFD").replace(/[\u0300-\u036f]/g, ""));
}