Clean up text wrapping once and for all

This commit is contained in:
Philip Douglass 2016-01-24 20:05:59 -05:00
parent 3b7508eac6
commit eec009fd18

View file

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