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.
|
||||
|
||||
var query = this.state.query;
|
||||
var caseSensitive = this.state.caseSensitive;
|
||||
var queryLen = query.length;
|
||||
|
||||
if (queryLen === 0)
|
||||
return [];
|
||||
|
||||
if (!caseSensitive) {
|
||||
pageContent = pageContent.toLowerCase();
|
||||
query = query.toLowerCase();
|
||||
}
|
||||
|
||||
var matches = [];
|
||||
|
||||
var matchIdx = -queryLen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user