Skip to content

Fix search to match substrings instead of exact text#12

Open
Vlad1k88 wants to merge 1 commit into
mate-academy:mainfrom
Vlad1k88:fix/search-substring-match
Open

Fix search to match substrings instead of exact text#12
Vlad1k88 wants to merge 1 commit into
mate-academy:mainfrom
Vlad1k88:fix/search-substring-match

Conversation

@Vlad1k88

Copy link
Copy Markdown

Summary

  • Fixed matches() in lib/store.js to use String.prototype.includes() instead of strict equality (===), so search returns all notes whose text contains the term rather than only exact matches.

Test plan

  • npm test — all 3 tests pass, including the two that were previously failing (search finds every note that contains the term, search finds a single containing note)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <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