From b84bc9b856902fed3c0930ff190641d1a284046e Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Mon, 11 Jan 2016 18:25:08 -0700 Subject: [PATCH] [Export] remove extra spaces from Markdown, YAML exports --- jrnl/plugins/markdown_exporter.py | 4 ++-- jrnl/plugins/yaml_exporter.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 147e8ac5..c9a11f86 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -52,12 +52,12 @@ class MarkdownExporter(TextExporter): if warn_on_heading_level is True: print("{}WARNING{}: Headings increased past H6 on export - {} {}".format(WARNING_COLOR, RESET_COLOR, date_str, entry.title), file=sys.stderr) - return "{md} {date} {title}\n{body} {space}".format( + return "{md} {date} {title}\n{body}{space}".format( md=heading, date=date_str, title=entry.title, body=newbody, - space="" + space="\n" ) @classmethod diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index b856e73b..5a23cc22 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -85,7 +85,7 @@ class YAMLExporter(TextExporter): # source directory is entry.journal.config['journal'] # output directory is...? - return "title: {title}\ndate: {date}\nstared: {stared}\ntags: {tags}\n{dayone} {body} {space}" \ + return "title: {title}\ndate: {date}\nstared: {stared}\ntags: {tags}\n{dayone}{body}{space}" \ .format( date=date_str, title=entry.title, @@ -93,7 +93,7 @@ class YAMLExporter(TextExporter): tags=', '.join([tag[1:] for tag in entry.tags]), dayone=dayone_attributes, body=newbody, - space="" + space="\n" ) @classmethod