This commit is contained in:
Philip Douglass 2017-03-09 22:55:55 +00:00 committed by GitHub
commit 0cf0535ce6
2 changed files with 5 additions and 4 deletions

View file

@ -48,11 +48,11 @@ class Entry:
if not short and self.journal.config['linewrap']:
title = textwrap.fill(date_str + " " + self.title, self.journal.config['linewrap'])
body = "\n".join([
textwrap.fill((line + " ") if (len(line) == 0) else line,
textwrap.fill(line,
self.journal.config['linewrap'],
initial_indent="| ",
subsequent_indent="| ",
drop_whitespace=False)
initial_indent=self.journal.config['indent'] + " ",
subsequent_indent=self.journal.config['indent'] + " ")
or self.journal.config['indent']
for line in self.body.rstrip(" \n").splitlines()
])
else:

View file

@ -29,6 +29,7 @@ class Journal(object):
'tagsymbols': '@',
'highlight': True,
'linewrap': 80,
'indent': "|"
}
self.config.update(kwargs)
# Set up date parser