Fix parsing issue

This commit is contained in:
Manuel Ebert 2015-04-05 18:38:30 +02:00
parent 6c18b6f3b4
commit b4e578b63a
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ class Journal(object):
# Initialise our current entry
entries = []
current_entry = None
date_blob_re = re.compile("^\[.+\] ")
date_blob_re = re.compile("^\[[^\\]]+\] ")
for line in journal_txt.splitlines():
line = line.rstrip()
date_blob = date_blob_re.findall(line)

View file

@ -58,8 +58,8 @@ older versions of jrnl anymore.
else:
plain_journals[journal_name] = path
longest_journal_name = max([len(journal) for journal in config['journals']])
if encrypted_journals:
longest_journal_name = max([len(journal) for journal in config['journals']])
util.prompt("\nFollowing encrypted journals will be upgraded to jrnl {}:".format(__version__))
for journal, path in encrypted_journals.items():
util.prompt(" {:{pad}} -> {}".format(journal, path, pad=longest_journal_name))