Review Request 129557: [okular] Enable searching for a phrase split by a newline character in a PDF
Marduk Bolanos
mardukbp at mac.com
Wed Jan 4 22:29:20 UTC 2017
> On Jan. 4, 2017, 10:13 p.m., Albert Astals Cid wrote:
> > home/marduk/textpage.cpp, line 57
> > <https://git.reviewboard.kde.org/r/129557/diff/1/?file=486539#file486539line57>
> >
> > so
> > from = "Hola\n"
> > to = "Adios "
> > returns true?
The function does not receive words but characters. The comparison between the text in the PDF and the search query is performed char by char. `from` is a char in the PDF and `to` is a char in the search query. Therefore, the actual behaviour is:
```
from = "\n"
to = " "
returns true
```
As a result, the phrase "hola\nadios" in the PDF generates a match when the search query is "hola adios".
- Marduk
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129557/#review101805
-----------------------------------------------------------
On Nov. 25, 2016, 7:46 a.m., Marduk Bolanos wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129557/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2016, 7:46 a.m.)
>
>
> Review request for Okular and Oliver Sander.
>
>
> Repository: okular
>
>
> Description
> -------
>
> A blank space in the query is matched against a newline character in the PDF.
>
>
> Diffs
> -----
>
> home/marduk/textpage.cpp 44dfa14d953c1cbfeff883d87d53516cdc530688
>
> Diff: https://git.reviewboard.kde.org/r/129557/diff/
>
>
> Testing
> -------
>
> Tried a few PDF files. It works.
>
>
> Thanks,
>
> Marduk Bolanos
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20170104/0de6287b/attachment.html>
More information about the Okular-devel
mailing list