aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/HighlightManager.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-03 19:09:25 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-03 19:09:25 -0500
commit2e02220de1d1de24375db11f22b4c6626c930a28 (patch)
treedeb0a8b1dd5fb1b6dc202e1782b0ebe4f568cfb8 /src/lib/common/HighlightManager.ts
parent5932844c5ddee2e0f751f1b8702c2cdfbeae575d (diff)
downloadtanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.tar.gz
tanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.tar.bz2
tanzanite-2e02220de1d1de24375db11f22b4c6626c930a28.zip
fix(HighlightManager#isMatch): make individual words case insensitive
Diffstat (limited to 'src/lib/common/HighlightManager.ts')
-rw-r--r--src/lib/common/HighlightManager.ts2
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());
}
}
}