Skip to content

Commit d8ebdbe

Browse files
cliffhallclaude
andcommitted
docs(filesystem): changeset and README note for edit_file line endings and indentation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
1 parent d95dd2f commit d8ebdbe

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": patch
3+
---
4+
5+
`edit_file` keeps a file's line endings: a CRLF file is written back with CRLF instead of being converted to LF. When `oldText` has no exact match and the whitespace-tolerant matcher is used, each replacement line now takes the indentation of the file line it replaces, shifted by its indentation relative to the matching `oldText` line, instead of only the first line being reindented.

‎src/filesystem/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ The server's directory access control follows this flow:
102102
- Line-based and multi-line content matching
103103
- Whitespace normalization with indentation preservation
104104
- Multiple simultaneous edits with correct positioning
105-
- Indentation style detection and preservation
105+
- Indentation style detection and preservation: when only whitespace differs, each replacement line takes the indentation of the line it replaces
106+
- Preserves the file's line endings (LF or CRLF)
106107
- Git-style diff output with context
107108
- Preview changes with dry run mode
108109
- Inputs:

0 commit comments

Comments
 (0)