X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9ed2542e938c327a53c17f8932ee5fc53776ba31..959848c17639bfc646128f6b582c5858164a5001:/black.py diff --git a/black.py b/black.py index 31859d1..c9c20df 100644 --- a/black.py +++ b/black.py @@ -3876,8 +3876,8 @@ def diff(a: str, b: str, a_name: str, b_name: str) -> str: """Return a unified diff string between strings `a` and `b`.""" import difflib - a_lines = [line + "\n" for line in a.split("\n")] - b_lines = [line + "\n" for line in b.split("\n")] + a_lines = [line + "\n" for line in a.splitlines()] + b_lines = [line + "\n" for line in b.splitlines()] return "".join( difflib.unified_diff(a_lines, b_lines, fromfile=a_name, tofile=b_name, n=5) )