-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing a note deletes commented out metadata in the frontmatter #72
Comments
I use Obsidian's official native command for updating the frontmatter: https://docs.obsidian.md/Reference/TypeScript+API/FileManager/processFrontMatter Any issue you have with that is with them, not with me sorry 🤷 |
I have raised this issue with the developers, they stick with their previous assertion that deletion of user data is intended behavior. There is an also an open issue on I figure this context is useful for anyone stumbling across this in the future. |
For my own opinion on the matter, you can see I commented in that thread last year: Seems logical to do it the way I suggest there, but no response from Obsidian devs. |
I must admit I skimmed that thread and didn't see that, thank you for giving me additional context. (I also tried raising awareness on the subreddit, and all conversation was shut down. For such a small issue, I'm surprised there's this much drama over it. And while writing this, I just noticed one of my comments on the API thread was deleted, which makes me question what else has been censored. I've been archiving every public-facing page related to this since things started being deleted. To be fair, it was slightly imflammatory, but that was kind of my point - igoring an issue doesn't solve it. Archive before the deletion for reference.) |
If it helps you feel more peace about the issue, my approach is to think of YAML as programmatic access only, not as free-form plain text. My notes are my own formatting, and YAML is there for data exchange between Obsidian and plugins, so I don't care how Obsidian decides to format it - as long as the data remains the same. (In this case, comments are not data, unless you put them into a comment field.) I did look at refactoring Share Note to modify the YAML without using Obsidian's intended frontmatter method, but it seemed more risky to do it that way, and the cons outweighed the pros. |
I thought I was taking that approach! But yea, the big lesson I'm taking from this is to be more flexible about how I put things together, cause even though it's unintentional, the foundations will be pulled from under me. For what it's worth, I agree, rolling your own implementation is fraught with risk because YAML is difficult to write parsing for and difficult to write correctly as a user because of its edge cases. |
I really hate that it reformats the frontmatter, because that breaks my workflow, but I am willing to live with that (especially since Obsidian itself breaks the frontmatter all the time). Deleting commented out data, however, I think is unacceptable.
The text was updated successfully, but these errors were encountered: