Fixes bug in tag export

This commit is contained in:
Manuel Ebert 2013-07-17 18:13:51 +02:00
parent 9309ec391b
commit d56f4140fb

View file

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