Skip to content

Commit

Permalink
update formatting function to better account for indenting (#1541)
Browse files Browse the repository at this point in the history
  • Loading branch information
wren authored Jul 16, 2022
1 parent e695180 commit ec8bbd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jrnl/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@ def _add_extra_style_args_if_needed(args, msg):


def format_msg_text(msg: Message) -> Text:
text = textwrap.dedent(msg.text.value.format(**msg.params)).strip()
text = textwrap.dedent(msg.text.value)
text = text.format(**msg.params)
# dedent again in case inserted text needs it
text = textwrap.dedent(text)
text = text.strip()
return Text(text)

0 comments on commit ec8bbd2

Please sign in to comment.