D19717: Search function fails to find phrases split over two lines

David Hurka noreply at phabricator.kde.org
Mon Apr 22 14:23:25 BST 2019


davidhurka added a comment.


  In D19717#454160 <https://phabricator.kde.org/D19717#454160>, @joaonetto wrote:
  
  > In D19717#454108 <https://phabricator.kde.org/D19717#454108>, @davidhurka wrote:
  >
  > > In D19717#453821 <https://phabricator.kde.org/D19717#453821>, @aacid wrote:
  > >
  > > > There's a downside to this is that now if you actually put a newline character in the search it will fail where previously it worked.
  > > >
  > > > On the other hand typing an actual newline character is kind of hard (i had to copy it from a newline in kate) so maybe we can just accept that noone really knew how to do that :D
  > > >
  > > > Opinions?
  > >
  > >
  > > The use case to insert a newline could be:
  > >  Someone is testing a LaTeX document, and searches for a passage from the source code (maybe some verbatim code).
  > >  One would just copy the passage in Kate and paste it into the search box in Okular.
  >
  >
  > Hmmmmm, I can treat things differently if there's a new line in the search box.
  >
  > Or maybe I should find a way to treat spaces the same as newline chars.
  >
  > I'll have to take a look in the compare function to see how it would handle, maybe compare alphanumeric only?
  >
  > If I can't do that, I'll have to treat them differently.
  
  
  I think it would make sense to treat all whitespace equally. At least on paper, there are several possible methods to disperse text. (Different line spacing, different line lengths...)  So it is difficult to predict whether I should/shouldn’t put a \n into the search box.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D19717

To: joaonetto, #okular
Cc: davidhurka, aacid, ngraham, okular-devel, joaonetto, tfella, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190422/46eb2f66/attachment.html>


More information about the Okular-devel mailing list