From 7d424937a0a2af6a655774451c063d8f6c848c8b Mon Sep 17 00:00:00 2001 From: Kat Hagan Date: Mon, 6 Jul 2020 11:34:15 -0700 Subject: [PATCH] Fix/search case sensitivity (#2182) * search should be case insensitive * fix missing search results due to column alignment * lowercase term instead of regex --- lib/note-list/index.tsx | 2 +- lib/search/index.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/note-list/index.tsx b/lib/note-list/index.tsx index d16c9fe44..ec0b20cb3 100644 --- a/lib/note-list/index.tsx +++ b/lib/note-list/index.tsx @@ -91,7 +91,7 @@ const renderNote = ( ) : ( { if ( searchTerms.length > 0 && - !searchTerms.every((term) => note.content.includes(term)) + !searchTerms.every((term) => + note.content.includes(term.toLocaleLowerCase()) + ) ) { continue; }