Skip to content

fix: reject empty or no-op find/replace arguments#51

Open
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/validate-find-args-issue-10
Open

fix: reject empty or no-op find/replace arguments#51
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/validate-find-args-issue-10

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Validate FIND is non-empty before walking the tree.
  • Reject FIND equal to REPLACE (no-op that still exits 0 today).

Test plan

  • go test ./...
  • TestValidateFindReplace

Closes #10

Made with Cursor

Refuse an empty FIND string and FIND equal to REPLACE before walking
the tree, avoiding accidental per-rune substitution storms.

Closes dolph#10

Co-authored-by: Cursor <cursoragent@cursor.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.

Empty find string causes infinite-substitution / unintended behavior

1 participant