mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
[Export] remove extra spaces from Markdown, YAML exports
This commit is contained in:
parent
14ef6e3dcb
commit
b84bc9b856
2 changed files with 4 additions and 4 deletions
|
@ -52,12 +52,12 @@ class MarkdownExporter(TextExporter):
|
||||||
if warn_on_heading_level is True:
|
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)
|
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,
|
md=heading,
|
||||||
date=date_str,
|
date=date_str,
|
||||||
title=entry.title,
|
title=entry.title,
|
||||||
body=newbody,
|
body=newbody,
|
||||||
space=""
|
space="\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -85,7 +85,7 @@ class YAMLExporter(TextExporter):
|
||||||
# source directory is entry.journal.config['journal']
|
# source directory is entry.journal.config['journal']
|
||||||
# output directory is...?
|
# 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(
|
.format(
|
||||||
date=date_str,
|
date=date_str,
|
||||||
title=entry.title,
|
title=entry.title,
|
||||||
|
@ -93,7 +93,7 @@ class YAMLExporter(TextExporter):
|
||||||
tags=', '.join([tag[1:] for tag in entry.tags]),
|
tags=', '.join([tag[1:] for tag in entry.tags]),
|
||||||
dayone=dayone_attributes,
|
dayone=dayone_attributes,
|
||||||
body=newbody,
|
body=newbody,
|
||||||
space=""
|
space="\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Add table
Reference in a new issue