beaussan / update-time-on-edit-obsidian

MIT License
169 stars 15 forks source link

disregards frontmatter that is already made #21

Closed crazymedguy closed 2 years ago

crazymedguy commented 2 years ago

When creating some frontmatter before the note is updating with the created and modified time, what happens is when the plugin updates with them, it creates a new frontmatter section on top of everything else. This causes a duplicate section on top, for example:

---
created: xxx
updated: xxx
---
---
my-attribute: yyy
---

Essentially causing a break. Would it be possible to insert within the existing frontmatter section if there already is one created in the note? Thank you.