We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ee1e81 commit cfd29b9Copy full SHA for cfd29b9
src/electron-preload/database-indexer/lib/util.ts
@@ -35,8 +35,11 @@ export const SERVICES_FACTORY = {
35
};
36
37
const trimNonLetterCharactersFilter: (value: string) => string = (() => {
38
- const re = /(^\P{L}+)|(\P{L}+$)/gu;
39
- return (value: string) => value.replace(re, "");
+ // TODO make sure all the possible unicode categories listed here except {L} and {N}
+ const toTrim = "[\\p{M}\\p{Z}\\p{S}\\p{P}\\p{C}]+";
40
+ const startEndTrimmingRe = new RegExp(`(^${toTrim})|(${toTrim}$)`, "gu");
41
+
42
+ return (value: string) => value.replace(startEndTrimmingRe, "");
43
})();
44
45
export function createMailsIndex(): MailsIndex {
0 commit comments