From c1ab32f8b1d54a00890b28bf74c1e7a9e011f1ab Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sun, 17 Nov 2024 17:12:58 +0100 Subject: [PATCH] Fix metadata import --- obsidian_import/obsidian.py | 2 +- test/test_obsidian_vault.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/obsidian_import/obsidian.py b/obsidian_import/obsidian.py index aed9020..39697df 100644 --- a/obsidian_import/obsidian.py +++ b/obsidian_import/obsidian.py @@ -171,7 +171,7 @@ class ObsidianVault: blocks_post_events=blocks_post_events, block_events=block_events, ).strip(), - metadata=contents.frontmatter, + **contents.frontmatter, ) self._save_file_text_to_cache( diff --git a/test/test_obsidian_vault.py b/test/test_obsidian_vault.py index 32cf806..a91840f 100644 --- a/test/test_obsidian_vault.py +++ b/test/test_obsidian_vault.py @@ -43,4 +43,4 @@ def test_write_internally(): expected_path = Path('test/daily/2020-01-01.md') assert expected_path in vault.internal_file_text_cache - assert vault.internal_file_text_cache[expected_path].data.startswith(b'---\n') + assert vault.internal_file_text_cache[expected_path].data.startswith(b'---\naliases:\n')