feat: case-insensitive search (#347)

This commit is contained in:
boojack
2022-10-27 08:05:45 +08:00
committed by GitHub
parent cb2e1ae355
commit bdf6d4d42a
3 changed files with 3 additions and 4 deletions

View File

@ -32,7 +32,6 @@ const MemoList = () => {
shouldShow = checkShouldShowMemoWithFilters(memo, filters);
}
}
if (tagQuery) {
const tagsSet = new Set<string>();
for (const t of Array.from(memo.content.match(new RegExp(TAG_REG, "g")) ?? [])) {
@ -63,7 +62,7 @@ const MemoList = () => {
shouldShow = false;
}
}
if (textQuery && !memo.content.includes(textQuery)) {
if (textQuery && !memo.content.toLowerCase().includes(textQuery.toLowerCase())) {
shouldShow = false;
}