Please STOP deleting comments in yaml

Obsidian deletes comments in yaml without warning

Obsidian has decided that deleting all comments in the yaml is a sound decision, and I would like to request that it be reversed.

Why it’s bad form to delete comments

As programmers you ought to know that comments can be essential to code: they act as definitions, explanations, reminders, and are often essential when handing over the code to a different user. They are not “arbitrary comments” as you mention in your reply to my bug report.

Comments are data, and data should NEVER be deleted period, let alone without warning or permission.

When does this deletion occur?

Obsidian has chosen to automatically re-format yaml to the long form whenever you modify (or accidentally modify) the yaml in reading mode or live preview mode. Apparently this was done to make it easier for those who create plugins.

Personally I do not think it is right to change my notes even if it is just yaml format. But what is definitely not fine is deleting my yaml comments. If Obsidian has not found a way to reformat yaml without deleting user comments, then it should not be reformatting the yaml. And if deleting the comments is a separate process from reformatting the yaml, then it should be easy enough to stop deleting the comments.

1 Like

Please note that this has been happening since the introduction of properties. It’s not a new thing.

I am gonna merge this thread with the one I linked.

A post was merged into an existing topic: YAML properties API: processFrontMatter removes string quotes, comments, types, formatting