fix: Escape f-string brace in multiline input tag handling

This commit is contained in:
Paul Gauthier (aider) 2024-11-19 12:34:43 -08:00
parent 81696c2e7a
commit 7b98db2f7d

View file

@ -455,7 +455,7 @@ class InputOutput:
elif line and line[-1] == "}" and multiline_input: elif line and line[-1] == "}" and multiline_input:
if multiline_tag: if multiline_tag:
# Check if the line ends with tag} # Check if the line ends with tag}
if line.endswith(f"{multiline_tag}}"): if line.endswith(f"{multiline_tag}}}"):
inp += line[:-len(multiline_tag)-1] + "\n" inp += line[:-len(multiline_tag)-1] + "\n"
break break
else: else: