Search result stops at ()

Steps to reproduce

Typing in a search result that includes ()` will cut off the remainder of the search.

For example:

2021-02-05_07-15-16

Here Obsidian searched for `println, which is different from my search query of `println()`.

It becomes more problematic when there are more phrases after ()`.

For instance:

2021-02-05_07-15-43

Here Obsidian ignored the -tag:code part because it happened after ()`.

Expected result

I would expect that the search doesn’t cutoff after a pair of parentheses (( and )).

Actual result

(See images above.)

Environment

  • Operating system: Windows 64 bit.
  • Obsidian version: Obsidian v0.10.12.

Additional information

This issue might be related to search ignores . character. Since I wasn’t sure that fixing that error would also fix the parentheses problem, I made a separate topic.

Does escaping the characters work? I.e., \(?

( and ) are part of the search syntax. You either use “(” or a regex.

1 Like

Good point. I didn’t think of that.

But with escaping I get no results (and there are files that should match):

2021-02-05_19-48-59

Escaping only one of the parentheses also returns ‘no matches found’.

Ah I see. Using double quotes does work. It doesn’t cut off the results anymore and it find all the files it should.

2021-02-05_19-52-26

Case closed! :slightly_smiling_face:

1 Like