highlight case insensitively
This commit is contained in:
parent
970bc84bb6
commit
15f19be408
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ class Highlighter {
|
||||||
// HTML and plain-text highlighting.
|
// HTML and plain-text highlighting.
|
||||||
|
|
||||||
var safeHighlight = this.html ? sanitizeHtml(highlights[0], sanitizeHtmlParams) : highlights[0];
|
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
|
// handle preamble
|
||||||
if (offset > lastOffset) {
|
if (offset > lastOffset) {
|
||||||
var subSnippet = safeSnippet.substring(lastOffset, offset);
|
var subSnippet = safeSnippet.substring(lastOffset, offset);
|
||||||
|
|
Loading…
Reference in a new issue