mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-26 09:57:54 +08:00
read_file and grep_search return a file's lines joined with `\n`, so a multi-line old_string quoted from a CRLF file never matched and edit_file failed with "old_string not found in file". On Windows that is every multi-line edit in a checkout made with Git's default core.autocrlf=true. When every line break in the file is `\r\n`, convert old_string and new_string to CRLF before matching, so the edit applies and inserted lines keep the file's line endings. LF and mixed files are unchanged.