Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile,Desktop: Fix nonbreaking spaces and CRLF break search for adjacent words #10417

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented May 9, 2024

Summary

This pull request fixes an issue reported on the forum: Limitations of Searching in Joplin.

Previously, non-breaking spaces (\u00A0) and CRLF seem to have been treated as word characters instead of separators by the FTS tokenizer. This pull request converts them to space characters during text normalization, which are marked as separators.

Note

Existing notes will need to be re-indexed for this change to apply.

Testing

This pull request includes an automated test. However, it can also be tested manually by:

  1. Creating a new note.
  2. Giving it a title.
  3. Opening Joplin's development tools and running console.log('\u00A0searchquerytesta\r\nsearchquerytestb').
  4. Copy the result and paste into Joplin.
  5. Search for searchquerytesta and verify that the just-created note is in the results.
  6. Search for searchquerytestb and verify that the just-created note is in the results.

@laurent22 laurent22 merged commit 09d088b into laurent22:dev May 12, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants