mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
typeahead: Treat query and source string in the same way before matching.
Like the source string, now the query too is converted into lower case and has diacritics removed, before trying to determine a match.
This commit is contained in:
@@ -62,6 +62,9 @@ export function query_matches_string(
|
||||
source_str = source_str.toLowerCase();
|
||||
source_str = remove_diacritics(source_str);
|
||||
|
||||
query = query.toLowerCase();
|
||||
query = remove_diacritics(query);
|
||||
|
||||
if (!query.includes(split_char)) {
|
||||
// If query is a single token (doesn't contain a separator),
|
||||
// the match can be anywhere in the string.
|
||||
|
||||
Reference in New Issue
Block a user