fix: Use strip("\r\n") for precise line ending removal

This commit is contained in:
Paul Gauthier (aider) 2024-11-21 10:10:14 -08:00
parent 59d0fe00c3
commit 614d297f22

View file

@ -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"