Skip to content

Fix three !s command bugs#54

Merged
zippy1981 merged 2 commits into
mainfrom
fix/replacer-bugs
Apr 26, 2026
Merged

Fix three !s command bugs#54
zippy1981 merged 2 commits into
mainfrom
fix/replacer-bugs

Conversation

@davelindsay84

Copy link
Copy Markdown
Collaborator

Summary

  • Split on first / only — search phrases containing / (e.g. !s AC/DC/something) previously parsed as search=AC, replace=DC; now correctly uses AC/DC as the search
  • Guard against undefined replacement crash!s phrase with no / would throw a TypeError in isBlockedSearchPhrase when SEARCH_PHRASES_TO_BLOCK is configured
  • Fix overly broad message skip filter — changed indexOf('!s') > -1 to === 0 so only messages that start with !s are excluded from search history, not any message that happens to contain those characters

Test plan

  • All 71 existing tests pass
  • Manual: !s AC/DC/something should search for AC/DC
  • Manual: !s phrase with no slash should not crash
  • Manual: messages mentioning !s mid-sentence should now be searchable

🤖 Generated with Claude Code

David Lindsay and others added 2 commits April 22, 2026 12:40
- Split on first / only so search phrases containing / (e.g. AC/DC) work correctly
- Guard isBlockedSearchPhrase against undefined replacement to prevent crash when no / is used
- Fix message skip filter to use === 0 so only !s commands are skipped, not any message containing !s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zippy1981 zippy1981 merged commit c8d2c74 into main Apr 26, 2026
1 check 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.

2 participants