diff --git a/tools/file_write b/tools/file_write index 55e5bd0..95e2ec8 100644 --- a/tools/file_write +++ b/tools/file_write @@ -23,6 +23,8 @@ def format_diff(path, old, new): diff = ''.join(difflib.unified_diff(old_lines, new_lines, fromfile=path, tofile=path)) if not diff: return None + if not diff.endswith('\n'): + diff += '\n' return f"```diff\n{diff}```" if len(sys.argv) < 3: