-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-minor] Highlight search results correctly for normalized text (PR 9448) #12855
[api-minor] Highlight search results correctly for normalized text (PR 9448) #12855
Conversation
26fe850
to
acc9761
Compare
acc9761
to
5e798ae
Compare
…R 9448) This patch is a rebased *and* refactored version of PR 9448, such that it applies cleanly given that `PDFFindController` has changed since that PR was opened; obviously keeping the original author information intact. This patch will thus ensure that e.g. fractions, and other things that we normalize before searching, will still be highlighted correctly in the textLayer. Furthermore, this patch also adds basic unit-tests for this functionality. *Note:* The `[api-minor]` tag is added, since third-party implementations of the `PDFFindController` must now always use the `pageMatchesLength` property to get accurate length information (see the `web/text_layer_builder.js` changes). Co-authored-by: Ross Johnson <[email protected]> Co-authored-by: Jonas Jenwald <[email protected]>
5e798ae
to
6dae267
Compare
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/2ea5340b7b9270a/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/ef68d172aa8acd4/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/ef68d172aa8acd4/output.txt Total script time: 3.58 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/2ea5340b7b9270a/output.txt Total script time: 4.70 mins
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/c56e4310bf39e0a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/c56e4310bf39e0a/output.txt Total script time: 4.06 mins Published |
Thanks a lot for fixing up this old PR! I found this version easier to follow, and with the added unit tests I have much more trust in that the functionality is correct. |
This patch is a rebased and refactored version of PR 9448, such that it applies cleanly given that
PDFFindController
has changed since that PR was opened; obviously keeping the original author information intact.This patch will thus ensure that e.g. fractions, and other things that we normalize before searching, will still be highlighted correctly in the textLayer.
Furthermore, this patch also adds basic unit-tests for this functionality.
Note: The
[api-minor]
tag is added, since third-party implementations of thePDFFindController
must now always use thepageMatchesLength
property to get accurate length information (see theweb/text_layer_builder.js
changes).Fixes #5668
Fixes #7230
Fixes #10708
Fixes bug 1680858