Skip to content

Commit

Permalink
Fix for Search for items with cyrillic titles dosnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
deneor committed Oct 18, 2023
1 parent 8a821c2 commit 84454b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const getDomainFromUrl = (url) => {
*/
const filterHelper = (compareStr, searchStr) => {
if (!compareStr) return false;
const process = (input) => input?.toString().toLowerCase().replace(/[^\w\s]/gi, '');
const process = (input) => input?.toString().toLowerCase().replace(/[^\w\s\p{Alpha}]/giu, '');
return process(searchStr).split(/\s/).every(word => process(compareStr).includes(word));
};

Expand Down

0 comments on commit 84454b0

Please sign in to comment.