{"version":"2.1.327","anchor":"edit-string-replacement-helper-reworked","canonical_anchor":"edit-string-replacement-helper-reworked","heading":"Edits that delete text may treat the following newline differently","tier":"notice","area":"Edit Tool","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/edit-string-replacement-helper-reworked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Edits that delete text may treat the following newline differently\n\nText replacement in edits no longer has a special case that also removes a trailing newline when text is deleted\n\n**Unclear.** It is not clear whether deletions still remove the newline after the deleted text.\n\n**What**\n\nWhen Claude edits a file by replacing one piece of text with another, Claude Code used to treat deletions (replacing text with nothing) specially by also removing a newline that followed it. That special case is gone. Claude Code now first looks for an alternative piece of text to replace, and uses it if the file contains it, otherwise it replaces the original text.\n\n**Why**\n\nEdits that delete text may leave whitespace differently than before.\n\n- Area: Edit Tool\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}