vrtmrz / obsidian-tagfolder

MIT License
211 stars 17 forks source link

Adds setting for storing tags of new notes in frontmatter #87

Closed wronex closed 1 year ago

wronex commented 1 year ago

Hello,

I like to store my tags in the frontmatter instead of in the file as hashtags. This pull request adds a setting for doing just that.

Instead of looking like this:

#mytag

Notes will look like this with the setting is enabled:

---
tags:
  - mytag
---

Tag expansion and clean-up logic

I'm a bit unsure about the tag expansion and clean-up logic.

There seems to be some corner-cases where the logic is incorrect. From what I can tell, this is not a regression, merely the same behavior as before.

For example, creating a new note for the tag structure #project -> EA-P230415 results in two tags being added to the new note instead of one.

image

What is created:

image

What is expected:

image

This problem only occur when there is a single note with the "#project/EA-P230415" tag. The problem goes away when there is more than one note:

image

Something to look out for and perhaps fix in a future release.

Thank you

Thanks for the awesome work. I hope you find this change useful.

vrtmrz commented 1 year ago

There seems to be some corner-cases where the logic is incorrect. From what I can tell, this is not a regression, merely the same behavior as before.

Thank you for pointing this out! I had just noticed it a while days ago too. I will handle it later. It should also happen while copying tags.

vrtmrz commented 1 year ago

It would be rude to forget to say this and say it last, but it would be even ruder not to, so let me say this... I appreciate your contribution and patience. And, I am really sorry for being delayed! I am very happy and honoured to improve this plug-in with you! Even though I have been lacking some time to merge it, all your contributions absolutely will not be ignored. So, thank you for your patience.