You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to preserve frontmatter formatting when patching a single key #24
Summary
Patching one frontmatter key re-serialises the whole YAML block. This changes lines that the instruction never targeted. Would you consider an opt-in option, e.g. preserveFrontmatterFormatting, that splices only the target key’s lines and leaves the rest of the block byte-for-byte unchanged?
Observed (via the Local REST API MCP vault_patch)
origin: (empty) becomes origin: null after a patch to a different key.
Creating a key with value: null writes destination: "null", a string rather than an empty value. This looks like a bug regardless of the option.
Template placeholders such as created: {{date:YYYY-MM-DD}} are turned into a nested mapping after a patch to another key. I appreciate this is not plain YAML, but it is common in Obsidian templates.
Comments and quoting style are lost.
Expected (with the option on)
Only the lines of the target key change. If the edit cannot be spliced safely (anchors, aliases, complex flow nodes), fall back to the current behaviour.
Prior art
The Preserve Frontmatter Formatting Obsidian plugin takes this approach, with the same fallback.
Activity
Repository owner locked and limited conversation to collaborators on Nov 10, 2026
Activity