diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-03 19:09:25 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-03 19:09:25 -0500 |
commit | 2e02220de1d1de24375db11f22b4c6626c930a28 (patch) | |
tree | deb0a8b1dd5fb1b6dc202e1782b0ebe4f568cfb8 /src | |
parent | 5932844c5ddee2e0f751f1b8702c2cdfbeae575d (diff) | |
download | tanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.tar.gz tanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.tar.bz2 tanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.zip |
fix(HighlightManager#isMatch): make individual words case insensitive
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/common/HighlightManager.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/common/HighlightManager.ts b/src/lib/common/HighlightManager.ts index eddd563..a8bacee 100644 --- a/src/lib/common/HighlightManager.ts +++ b/src/lib/common/HighlightManager.ts @@ -129,7 +129,7 @@ export class HighlightManager { return phrase.toLocaleLowerCase().includes(hl.word.toLocaleLowerCase()); } else { const words = phrase.split(/\s*\b\s/); - return words.includes(hl.word); + return words.some((w) => w.toLocaleLowerCase() === hl.word.toLocaleLowerCase()); } } } |