From 4f72619830e67056f32e806948e9eafe53b13323 Mon Sep 17 00:00:00 2001 From: flight16 Date: Tue, 2 Jun 2015 14:47:56 +0900 Subject: [PATCH] Remove dead code in Journal.filter(). --- jrnl/Journal.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index af9e6b9e..2efb5004 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -179,20 +179,6 @@ class Journal(object): and (not start_date or entry.date >= start_date) and (not end_date or entry.date <= end_date) ] - if short: - if tags: - for e in self.entries: - res = [] - for tag in tags: - matches = [m for m in re.finditer(tag, e.body)] - for m in matches: - date = e.date.strftime(self.config['timeformat']) - excerpt = e.body[m.start():min(len(e.body), m.end() + 60)] - res.append('{0} {1} ..'.format(date, excerpt)) - e.body = "\n".join(res) - else: - for e in self.entries: - e.body = '' self.entries = result def new_entry(self, raw, date=None, sort=True):