Exact phrase search fails for consecutive spaces

It appears that search is stripping extra spaces from search phrases, and then of course, failing to find matches where extra spaces exist in the document.

If I type:
0 "Extra spaces"
1 "Extra spaces"
2 "Extra spaces"
3 "Extra spaces"

And then copy and paste any of the “Extra spaces” phrases (with quotes) into the search window, I expect the exact phrase I copied to be the one phrase found.

Instead, the first phrase (with no extra spaces), and only the first phrase, is always found. Whether I put one space or 20 spaces between words, only matching phrases with a single space between each word are found.

I have verified in the Windows 10 desktop app version 1.4.5, and in the Chrome browser. My installation’s are unmodified (no scripts).

Edit: I just noticed that, as displayed, the extra spaces I entered appear to have been stripped from the post. Ironic. In case it isn’t clear, in my test data there is one extra space (2 spaces total) between the words “Extra” and “spaces” on the line beginning with the number 1, and so on.

Does it match if you search just for the words Extra spaces (without the double quotes)?

I’m not sure what you are asking. Work in what way? Did you try what I described and it does for you what it would not do for me?

The short answer is “No”. It can’t “work” without the quotes, because without the quotes it is not an exact phrase search. It is just a search for an item containing those two words, and it works exactly as it should. Every item containing the two words (in any order) is found, but that is not the search I want to perform. I should be able to search for " " (that has 5 spaces) and find every occurrence of 5 (or more) consecutive spaces in my document. Currently, I cannot.

As it stands, the only way I know to find where consecutive spaces occur in a document is to use Find/Replace. (It works exactly like I expect an exact phrase search to work.) I have to search for the phrase with consecutive spaces, replace it with a phrase containing a unique typo, and then search for that typo to to show the phrases I wanted to find in the first place. Then, of course, I must perform a Find/Replace to remove the typo. Clumsy and inefficient.

Workflowy behaves exactly like I expect it should, ignoring spaces and word order if quotes are not used, but respecting consecutive spaces when using double quotes. Microsoft Word, Libre Word, Sublime Text, Notepad++, Gedit, ReText, Evernote, and Chrome (when searching web pages) all search for exact phrases by default and respect consecutive spaces.

Ah, that last sentence made me realize another potential work-around. If I change the ctrl+f hot hey for search to something else, then that combination opens Chrome’s search, which as I noted, finds exact phrases by default. This doesn’t work from the desktop app, so I have to open Dynalist in chrome, and it only works on expanded branches in focus.

This thread is too confusing to read. Can you ask a shorter question? Why are you searching for doublespaces? Why are you even typing them? I am beyond confused from the start and reading further just sends me into the twilight zone because you switch you the literal phase “Extra spaces” haha. I can’t. My brains spinning.

Oh I totally misunderstood your post because of the way the spaces are squished in the forum post.

Here’s a screenshot of what they actually look like in plaintext:

Ok now that that’s out of the way, I do agree if you’re searching for "Extra_____spaces" and it’s not matching then that’s indeed a bug.

1 Like

I can reproduce the issue and I got a patch that will be released to the web version in a few days.

Wonderful. (I did try to explain in the last paragraph of my post that the spaces were not displaying correctly.)

I actually never asked a question. I reported a bug, and really, the very first paragraph is all you have to read and understand. The rest of the original post was just following the guidelines for bug reporting by providing an example that reveals the bug.

I did try to read the plaintext by editing the post with admin permissions, but somehow I still misunderstood it the first pass :sweat_smile:

You can quote it too

Yeah I didn’t get to the disclaimer at the end because no amount of thinking could make the beginning start to make sense. But turns out it was a puzzle.