From 12c10034a751a03fa8a77d5c867f6102106cffd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Thu, 21 Aug 2014 16:32:25 +0200 Subject: [PATCH] Humanize markdown diffs --- taiga/mdrender/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/taiga/mdrender/service.py b/taiga/mdrender/service.py index 35a1fff1..baeb6c3d 100644 --- a/taiga/mdrender/service.py +++ b/taiga/mdrender/service.py @@ -112,7 +112,8 @@ class DiffMatchPatch(diff_match_patch.diff_match_patch): def get_diff_of_htmls(html1, html2): diffutil = DiffMatchPatch() - diff = diffutil.diff_main(html1, html2) - return diffutil.diff_pretty_html(diff) + diffs = diffutil.diff_main(html1, html2) + diffutil.diff_cleanupSemantic(diffs) + return diffutil.diff_pretty_html(diffs) __all__ = ["render", "get_diff_of_htmls", "render_and_extract"]