Skip to content

Commit 7c7a37e

Browse files
committed
feat: make search accent insensitive
1 parent e5afdc2 commit 7c7a37e

File tree

1 file changed

+11
-0
lines changed
  • web/src/core/usecases/softwareCatalog

1 file changed

+11
-0
lines changed

web/src/core/usecases/softwareCatalog/thunks.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,17 @@ const { filterBySearchMemoized } = (() => {
319319
},
320320
cache: 100,
321321
tokenize: "full",
322+
charset: {
323+
split: /\s+/,
324+
rtl: false,
325+
encode: (str: string): string[] => {
326+
const normalized = str
327+
.normalize("NFD")
328+
.replace(/[\u0300-\u036f]/g, "")
329+
.toLowerCase();
330+
return [normalized];
331+
}
332+
},
322333
context: {
323334
resolution: 9,
324335
depth: 2,

0 commit comments

Comments
 (0)