mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Indent character optional
This commit is contained in:
parent
bdc9dc598d
commit
6a53da5efd
1 changed files with 5 additions and 2 deletions
|
@ -74,7 +74,10 @@ class Entry:
|
||||||
"""Returns a pretty-printed version of the entry.
|
"""Returns a pretty-printed version of the entry.
|
||||||
If short is true, only print the title."""
|
If short is true, only print the title."""
|
||||||
date_str = self.date.strftime(self.journal.config['timeformat'])
|
date_str = self.date.strftime(self.journal.config['timeformat'])
|
||||||
indent = self.journal.config['indent_character'].rstrip() + " "
|
if self.journal.config['indent_character']:
|
||||||
|
indent = self.journal.config['indent_character'].rstrip() + " "
|
||||||
|
else:
|
||||||
|
indent = ""
|
||||||
if not short and self.journal.config['linewrap']:
|
if not short and self.journal.config['linewrap']:
|
||||||
title = textwrap.fill(date_str + " " + self.title, self.journal.config['linewrap'])
|
title = textwrap.fill(date_str + " " + self.title, self.journal.config['linewrap'])
|
||||||
body = "\n".join([
|
body = "\n".join([
|
||||||
|
|
Loading…
Add table
Reference in a new issue