add support for case sensitive
This commit is contained in:
parent
6864a07221
commit
6022476f03
@ -247,11 +247,17 @@ var PDFFindController = {
|
|||||||
// TODO: Handle the other find options here as well.
|
// TODO: Handle the other find options here as well.
|
||||||
|
|
||||||
var query = this.state.query;
|
var query = this.state.query;
|
||||||
|
var caseSensitive = this.state.caseSensitive;
|
||||||
var queryLen = query.length;
|
var queryLen = query.length;
|
||||||
|
|
||||||
if (queryLen === 0)
|
if (queryLen === 0)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
|
if (!caseSensitive) {
|
||||||
|
pageContent = pageContent.toLowerCase();
|
||||||
|
query = query.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
var matches = [];
|
var matches = [];
|
||||||
|
|
||||||
var matchIdx = -queryLen;
|
var matchIdx = -queryLen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user