Editing File Property Through a Base Changes YAML Indentation of the Whole Frontmatter to 2

Steps to reproduce

  1. Create a file with a YAML properties section containing the following:

    filter_for_me: 1
    property_to_change: change me to anything else
    nested_list:
        - one
        - two
        - three
    tags:
        - something
        - else
    
  2. Create a base that filters for files where filter_for_me equals 1 and displays the property property_to_change in one of the columns.

  3. Edit the value of property_to_change through the created base.

  4. Go back to the file from step (1) and observe the indentation levels.

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The value of property_to_change should be the ONLY thing that’s different than the original YAML in the property section.

Actual result

In addition to the changed value of property_to_change, the indentation of all nested properties/lists will be change to 2 spaces regardless of what it was before. In this case, the lists beneath nested_list and tags will both be changed from 4 spaces to 2.

This is maddening because there is no way to change this behavior. The Obsidian editor will still insert 4 spaces when you press the Tab key while editing the frontmatter, and in all other ways behave as if the indentation level is 4. So there’s not even an easy way to accede to the apparent preference for 2-space indentation in the frontmatter.

Further, because the normal text editor also doesn’t let you use anything other than 4 spaces for indentation if you’re not using tabs, there’s also no good way to keep your indentations consistent across your whole file.

Environment

SYSTEM INFO:
	Obsidian version: v1.9.14
	Installer version: v1.8.4
	Operating system: Windows 11 Enterprise 10.0.22631
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: dark
	Community theme: none
	Snippets enabled: 3
	Restricted mode: off
	Plugins installed: 5
	Plugins enabled: 5
		1: Tag Wrangler v0.6.4
		2: Templater v2.16.2
		3: Linter v1.30.0
		4: Dataview v0.5.68
		5: Calendar v1.5.10

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

I’ve noticed this behavior before in other official tools that are used to automatically alter the frontmatter, though the only specific instance I can think of is when I used the Format Converter.

this is not a bug. We manage the whole frontmatter programmatically with a library and specific set of constrains

Continue here: