Made indent character configurable. Looks nice with │ (BOX DRAWINGS LIGHT VERTICAL)

This commit is contained in:
Philip Douglass 2015-08-28 12:19:29 -04:00
parent 1ea5255aa0
commit 8c5c47f2ca
2 changed files with 4 additions and 2 deletions

View file

@ -50,8 +50,9 @@ class Entry:
body = "\n".join([
textwrap.fill(line,
self.journal.config['linewrap'],
initial_indent="| ",
subsequent_indent="| ") or "|"
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