Fixes bug in tag export

This commit is contained in:
Manuel Ebert 2013-07-17 18:13:51 +02:00
parent 1b3359f1f1
commit 4d681ca095

View file

@ -16,7 +16,7 @@ class Entry:
def parse_tags(self):
fulltext = " ".join([self.title, self.body]).lower()
tags = re.findall(r'(?u)([{}]\w+)'.format(self.journal.config['tagsymbols']), fulltext, re.UNICODE)
self.tags = set(tags)
return set(tags)
def __unicode__(self):
"""Returns a string representation of the entry to be written into a journal file."""
@ -57,7 +57,7 @@ class Entry:
)
def __repr__(self):
return str(self)
return "<Entry '{}' on {}>".format(self.title.strip(), self.date.strftime("%Y-%m-%d %H:%M"))
def to_dict(self):
return {