From 545d2c296ae0a1627aece19d15b9fbeeb93645d7 Mon Sep 17 00:00:00 2001 From: William Minchin Date: Fri, 7 Feb 2014 08:24:30 -0700 Subject: [PATCH] Fix linewrap If a line was exactly the length of `linewrap`, the extra space was causing the next line to be blank. But if the line is empty, we need the space to maintain the `| ` sidebar. --- jrnl/Entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index afef245b..d4d3bb6d 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -42,7 +42,7 @@ 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+" ", + textwrap.fill((line + " ") if (len(line) == 0) else line, self.journal.config['linewrap'], initial_indent="| ", subsequent_indent="| ",