mgmeyers / obsidian-style-settings

A dynamic user interface for adjusting theme, plugin, and snippet CSS variables within Obsidian
GNU General Public License v3.0
1.03k stars 95 forks source link

Bug: Toggle command adds three empty lines before frontmatter YAML #152

Closed kometenstaub closed 3 months ago

kometenstaub commented 3 months ago

When using the "Toggle between reduced and max image size" command defined by Shimmering Focus (cc @chrisgrieser), three empty lines are prepended to the document, rendering frontmatter YAML unusable.

When no YAML is present, only one line is prepended to the note.

cc @mProjectsCode, I think you initially PRed that feature?

Obsidian version: 1.5.10 Installer version 1.5.6 Style Settings: 1.0.7

This issue also happens in the sandbox with just Style Settings and Shimmering Focus installed.

image image
mProjectsCode commented 3 months ago

It seems like this commit broke the toggle command and causes the error that you are seeing in the console. No idea why it modifies the document though.

kometenstaub commented 3 months ago

It might trigger something Obsidian responds to in this way. No idea. 🤷

kometenstaub commented 3 months ago

Thank you! ❤️