mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[api-minor] Add support, in PDFFindController
, for mixing phrase/word searches (issue 7442)
*Please note:* This patch only extends the `PDFFindController` implementation itself to support this functionality, however it's *purposely* not exposed in the default viewer. This replaces the previous `phraseSearch`-parameter, and a `query`-string will now always be interpreted as a phrase-search. To enable searching for individual words, the `query`-parameter must instead consist of an Array of strings. This way it's now also possible to combine phrase/word searches, with a `query`-parameter looking something like `["Lorem ipsum", "foo", "bar"]` which will search for the phrase "Lorem ipsum" *and* the words "foo" respectively "bar".
This commit is contained in:
parent
4d8a60b435
commit
0e19c3a120
6 changed files with 95 additions and 48 deletions
|
@ -222,7 +222,6 @@ class MozL10n {
|
|||
source: window,
|
||||
type: type.substring(findLen),
|
||||
query: detail.query,
|
||||
phraseSearch: true,
|
||||
caseSensitive: !!detail.caseSensitive,
|
||||
entireWord: !!detail.entireWord,
|
||||
highlightAll: !!detail.highlightAll,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue