mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Fix diff output vertical spacing
This commit is contained in:
@@ -627,8 +627,8 @@ def get_diff(before, after):
|
|||||||
try:
|
try:
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter('ignore')
|
warnings.simplefilter('ignore')
|
||||||
differ = difflib.unified_diff(before.split("\n"), after.split("\n"), 'before', 'after', '', '', 10)
|
differ = difflib.unified_diff(before.splitlines(True), after.splitlines(True), 'before', 'after', '', '', 10)
|
||||||
return "\n".join(list(differ))
|
return "".join(list(differ))
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
return ">> the files are different, but the diff library cannot compare unicode strings"
|
return ">> the files are different, but the diff library cannot compare unicode strings"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user