Skip to content

Fix search to match notes that contain the term - #328

Open
Hot00Tea wants to merge 1 commit into
mate-academy:mainfrom
Hot00Tea:fix-search-contains
Open

Hot00Tea wants to merge 1 commit into
mate-academy:mainfrom
Hot00Tea:fix-search-contains

Conversation

@Hot00Tea

Copy link
Copy Markdown

matches() compared note.text to the term with ===, so search only returned notes whose text was exactly the term. Searching "milk" missed "buy milk" and "milk the almonds". Use String.prototype.includes so any note containing the term is returned, as the command is documented to do.

Also add notes.md with my own quick commit message for comparison.

matches() compared note.text to the term with ===, so `search` only
returned notes whose text was exactly the term. Searching "milk" missed
"buy milk" and "milk the almonds". Use String.prototype.includes so any
note containing the term is returned, as the command is documented to do.

Also add notes.md with my own quick commit message for comparison.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant