Search should optionally be whitespace insensitive
Submitted by Peter Lyons
Assigned to poppler-bugs
= Transfering this bug from GNOME Bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=408299 =
When searching a PDF document for a particular phrase containing spaces (as opposed to a single keyword), search will not match occurances of that phrase if they occur in a paragraph and have been laid out with a line break in the middle of the phrase. This behavior is sometimes desired. However, I would like an option to search where all whitespace is considered equivalent. This would be useful for normal paragraphs-of-text type traditional documents. Perhaps this mode should be default, even.
For example, if my document contains: "around the\nbend" where \n is a line break, and my search text is "around the bend", I would like search to match in this case. Basically, if spaces in the search string would be treated as a multiline regex \s character class, that should do it.
Comment 3 from Pablo Rodríguez (points: 10) 2007-04-19 17:51 UTC [reply]
I guess that whitespaces should be treated the same way than in regexp searches, because otherwise it might be confusing and potentially misleading for users. Regexp search should be an alternative to the standard search.
But this is my personal opinion.
Comment 4 from Philip Ganchev (points: 6) 2007-04-19 20:18 UTC [reply]
You mean standard search should ignore line breaks, but regexp search should not. This is what I think too.
Comment 5 from Peter Lyons (reporter, points: 2) 2007-04-19 20:32 UTC [reply]
That seems good to me. Regular non-tech searchers get all whitespace treated as equal, but if you want to be advanced and do a regex search, you know about whitespace and want your regex to work just as it would in a programming language.