filesystem: strip trailing newline in _number_diff so diff lines aren't blank-separated
_unified_diff (used by edit_lines / smart_edit) feeds difflib with
"line + \n" so difflib does not emit a "\ No newline at end of file" marker.
With lineterm="" difflib keeps that trailing "\n" on content lines, so the
final "\n".join produced "\n\n" between every diff line — a blank line
between each, bloating the model-facing output and rendering with double
spacing in both clients. Strip the trailing "\n" in _number_diff before
processing; no-op for the _diff action, whose lines come from splitlines()
without trailing newlines.
1 parent 8602b68 commit 8e3570bf7dc0905a63d7cbd388901c258394f866
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 9 hours ago
Showing 2 changed files
View
navi/tools/filesystem.py
View
tests/unit/tools/test_filesystem.py