fix: allow adding inline tags with same key different values (#17)

This commit is contained in:
Nathaniel Landau
2023-02-05 13:07:48 -05:00
committed by GitHub
parent 401d830942
commit 446374b335
5 changed files with 92 additions and 36 deletions

View File

@@ -99,6 +99,21 @@ def test_add_metadata_inline(short_note) -> None:
)
assert "new_key2:: new_value1" in note.file_content
assert (
note.add_metadata(
MetadataType.INLINE, key="new_key2", value="new_value2", location=InsertLocation.BOTTOM
)
is True
)
assert "new_key2:: new_value2" in note.file_content
assert (
note.add_metadata(
MetadataType.INLINE, key="new_key2", value="new_value2", location=InsertLocation.BOTTOM
)
is False
)
def test_add_metadata_frontmatter(sample_note) -> None:
"""Test adding metadata."""