From 4d05bba39ca22ea853cea11f2e80dccad4e7c084 Mon Sep 17 00:00:00 2001 From: garylin2099 Date: Wed, 15 May 2024 21:43:31 +0800 Subject: [PATCH] fix redundant new line --- metagpt/tools/libs/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/tools/libs/editor.py b/metagpt/tools/libs/editor.py index fcf892fdb..94836a9fe 100644 --- a/metagpt/tools/libs/editor.py +++ b/metagpt/tools/libs/editor.py @@ -165,7 +165,7 @@ class Editor: # irrespective of the length difference between the original and new content. lines[start_line_index:end_line_index] = new_content_lines else: - lines.insert(start_line_index, "\n".join(new_content_lines)) + lines.insert(start_line_index, "".join(new_content_lines)) else: del lines[start_line_index:end_line_index]