From 614d297f2294e4a3339c74cefd59a948af0e873f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 21 Nov 2024 10:10:14 -0800 Subject: [PATCH] fix: Use `strip("\r\n")` for precise line ending removal --- aider/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index 625ee42dd..fbe4c2de6 100644 --- a/aider/io.py +++ b/aider/io.py @@ -455,12 +455,12 @@ class InputOutput: elif multiline_input and line.strip(): if multiline_tag: # Check if line is exactly "tag}" - if line.strip() == f"{multiline_tag}}}": + if line.strip("\r\n") == f"{multiline_tag}}}": break else: inp += line + "\n" # Check if line is exactly "}" - elif line.strip() == "}": + elif line.strip("\r\n") == "}": break else: inp += line + "\n"