beaussan / update-time-on-edit-obsidian

MIT License
165 stars 15 forks source link

[Bug?] Unfilled frontmatter set to "null" #49

Closed technotherion closed 1 year ago

technotherion commented 1 year ago

I often leave placeholders in my frontmatter while I'm filling out a page from a template. When the updated and created time updates, it sets all of the unfilled values in my frontmatter to "null".

Example frontmatter from my daily note:

Sleep: 6
Energy: null
Focus: null
Stress: null
Physical: l
Social: null
Front: null
Issues: null
Class: Mood
updated: 2023-07-27T18:47
created: 2023-07-27T00:09

This does not cause any issues for me personally to have null placed instead of having a blank value, but seemed like unexpected behavior.

beaussan commented 1 year ago

This is coming from obsidian own's api processFrontMatter, that tries to make valid yaml at every step, and thus, setting null instead of empty.

Given their answer on a previous topic related to the yaml formatting, I guess it's intended behaviour from their side. Feel free to open an issue on the obsidian api repo !