Duplicate Note References (TypeAhead)

Hi everyone, I experienced a similar issue with duplicate entries in the autocomplete list. I managed to resolve it by manually ensuring that all internal note references were wrapped in spaces—so they aren’t immediately followed by any other character like a comma or a period.

Bear Version: Version 2.3.11 (13231)
OS Version: MacOS Monterey 12.7.6 (21H1320)

What were you doing:
I was creating internal note links using the inline reference syntax (i.e., typing [[note]]) within paragraphs of text. In many cases, I followed the closing ]] immediately with punctuation (such as a comma, period, or even a line break) rather than a space.

What feature did you use:
Internal linking via the typeahead autocomplete feature.

What happened:
I noticed that the typeahead autocomplete list displayed duplicate entries for the same note. The duplicates appeared when the closing ]] was immediately followed by any character other than a space. To test this, I searched for all note links in my library and inserted a space after each closing ]], after which the duplicate entries immediately disappeared. This behaviour seems identical to previously reported issues (e.g., “Autocomplete list contains duplicates” from June 2023).

What did you expect to happen:
I expected that the autocomplete list would display each note only once, regardless of the character immediately following the closing brackets. It would be ideal if the parser could handle punctuation and line breaks consistently without creating duplicate suggestions.

I hope these details help in identifying and resolving the issue in a more general and less manual way.

Thanks for this awesome product, I love Bear!