[meld] dirdiff: Fix folder comparison ignore blank lines with filters (#314)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] dirdiff: Fix folder comparison ignore blank lines with filters (#314)
- Date: Sun, 5 May 2019 22:53:31 +0000 (UTC)
commit 7770fea79af79a0bb6fc357f88271449cf377dfe
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon May 6 08:49:55 2019 +1000
dirdiff: Fix folder comparison ignore blank lines with filters (#314)
Because of the order of operations, folder comparisons weren't ignoring
blank line differences when the blank lines were the result of applying
text filters.
meld/dirdiff.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index a73dd727..4b41e125 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -141,6 +141,10 @@ def _normalize(contents, ignore_blank_lines, regexes=()):
if regexes:
contents = (apply_text_filters(c, regexes) for c in contents)
+ if ignore_blank_lines:
+ # We re-remove blank lines here in case applying text
+ # filters has caused more lines to be blank.
+ contents = (remove_blank_lines(c) for c in contents)
return contents
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]