From 15f19be408d17d27824b67d5bc53786ff90f645c Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 28 Dec 2015 03:14:50 +0000 Subject: [PATCH] highlight case insensitively --- src/HtmlUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index 196b87a972..e194f4a3bd 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -69,7 +69,7 @@ class Highlighter { // HTML and plain-text highlighting. var safeHighlight = this.html ? sanitizeHtml(highlights[0], sanitizeHtmlParams) : highlights[0]; - while ((offset = safeSnippet.indexOf(safeHighlight, lastOffset)) >= 0) { + while ((offset = safeSnippet.toLowerCase().indexOf(safeHighlight.toLowerCase(), lastOffset)) >= 0) { // handle preamble if (offset > lastOffset) { var subSnippet = safeSnippet.substring(lastOffset, offset);