Skip to content

Commit 275c691

Browse files
committed
Revert change that made clean_writer output two blank lines.
1 parent c3afcf9 commit 275c691

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

domdf_python_tools/paths.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,6 @@ def clean_writer(string: str, fp: IO) -> None:
264264

265265
buffer = StringList(string)
266266
buffer.blankline(ensure_single=True)
267-
268-
if len(buffer) == 1 and buffer.count_blanklines() == 1:
269-
buffer.blankline()
270-
271267
fp.write(str(buffer))
272268

273269

tests/test_paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_clean_writer():
278278
"Line with tabs",
279279
"Too many newlines",
280280
"",
281-
]), ([], ["\n"])]
281+
]), ([], [''])]
282282
)
283283
def test_pathplus_write_clean(input_string, output_string):
284284
with TemporaryDirectory() as tmpdir:

0 commit comments

Comments
 (0)