From: W. Trevor King Date: Sun, 24 Jan 2010 15:59:20 +0000 (-0500) Subject: Fix Diff.comment_body_change_string's difflib.unified_diff call X-Git-Tag: 1.0.0~59^2~43^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d02bebf9909f3ada44719b1823c302f56cc0637e;p=be.git Fix Diff.comment_body_change_string's difflib.unified_diff call --- diff --git a/libbe/diff.py b/libbe/diff.py index 94a2dc3..35e2151 100644 --- a/libbe/diff.py +++ b/libbe/diff.py @@ -671,4 +671,7 @@ class Diff (object): return self._comment_summary_string(new_comment) def comment_body_change_string(self, bodies): old_body,new_body = bodies - return difflib.unified_diff(old_body, new_body) + return ''.join(difflib.unified_diff( + old_body.splitlines(True), + new_body.splitlines(True), + 'before', 'after'))