mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
Ensure exported entries end in a newline for Markdown and YAML exporters (#908)
* [Markdown Exporter] [YAML Exporter] Ensure exported entires end in a newline Fixes #768, Fixes #881. If the exported entry does not have a final empty line, this will add one on export. Some Markdown parsers get picky about not having a empty line above a heading.... * fix black formatting issues * explicitly sort filenames to deal with inconsistent default file ordering on different OS's * Update .gitignore * Update test for typo fix Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
parent
62ea1e2b23
commit
68ad5c0c1a
5 changed files with 52 additions and 1 deletions
|
@ -96,6 +96,11 @@ def create_directory(context, dir_name):
|
|||
def assert_dir_contains_files(context, dir_name, expected_files_json_list):
|
||||
actual_files = os.listdir(dir_name)
|
||||
expected_files = json.loads(expected_files_json_list)
|
||||
|
||||
# sort to deal with inconsistent default file ordering on different OS's
|
||||
actual_files.sort()
|
||||
expected_files.sort()
|
||||
|
||||
assert actual_files == expected_files, [actual_files, expected_files]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue