mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
Code fixes as per review
This commit is contained in:
parent
a86e15b1aa
commit
31a040878c
1 changed files with 15 additions and 13 deletions
|
@ -40,7 +40,7 @@ class YAMLExporter(TextExporter):
|
||||||
previous_line = ""
|
previous_line = ""
|
||||||
warn_on_heading_level = False
|
warn_on_heading_level = False
|
||||||
for line in body.splitlines(True):
|
for line in body.splitlines(True):
|
||||||
if re.match(r"#+ ", line):
|
if re.match(r"^#+ ", line):
|
||||||
"""ATX style headings"""
|
"""ATX style headings"""
|
||||||
newbody = newbody + previous_line + heading + line
|
newbody = newbody + previous_line + heading + line
|
||||||
if re.match(r"^#######+ ", heading + line):
|
if re.match(r"^#######+ ", heading + line):
|
||||||
|
@ -96,7 +96,9 @@ class YAMLExporter(TextExporter):
|
||||||
if hasattr(entry, "creator_os_agent"):
|
if hasattr(entry, "creator_os_agent"):
|
||||||
dayone_attributes += f" os agent: {entry.creator_os_agent}\n"
|
dayone_attributes += f" os agent: {entry.creator_os_agent}\n"
|
||||||
if hasattr(entry, "creator_software_agent"):
|
if hasattr(entry, "creator_software_agent"):
|
||||||
dayone_attributes += f" software agent: {entry.creator_software_agent}\n"
|
dayone_attributes += (
|
||||||
|
f" software agent: {entry.creator_software_agent}\n"
|
||||||
|
)
|
||||||
|
|
||||||
# TODO: copy over pictures, if present
|
# TODO: copy over pictures, if present
|
||||||
# source directory is entry.journal.config['journal']
|
# source directory is entry.journal.config['journal']
|
||||||
|
|
Loading…
Add table
Reference in a new issue