From 756c7574cd780eb25997898629af40436afe6f87 Mon Sep 17 00:00:00 2001 From: Dan Gilkerson Date: Mon, 14 Oct 2019 08:11:31 -0700 Subject: [PATCH] Case insensitive search Partial fix for Fuzzy matching #13 --- src/highlighter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highlighter.js b/src/highlighter.js index 874c714..790b1fd 100644 --- a/src/highlighter.js +++ b/src/highlighter.js @@ -107,7 +107,7 @@ function highlight(content, word, patternSelected, color, bgColor, padding) { const spanEnd = "" let result = content if (word != "") { - let regex = new RegExp(patternSelected, "g") + let regex = new RegExp(patternSelected, "gi") result = content.replace(regex, spanStart + "$&" + spanEnd) } return result