mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
add support for case sensitive
This commit is contained in:
parent
6864a07221
commit
6022476f03
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue