I don’t know if this is a feature request or bug report, so I’ve put it here initially.
I wanted to organize some data in my YAML frontmatter by keeping it namespaced under parent properties. However, Obsidian is set by default to indent using tabs rather than spaces, and this applies also when editing the YAML frontmatter.
Currently, this results in the frontmatter failing to parse if there are any tab-indented portions. If there are no tab-indented portions then parsing succeeds as expected. If indentation is manually done with spaces then parsing also succeeds, until I meet a tab increment at which point the spaces are converted into a tab and parsing fails again.
I can think of two possible solutions off the top of my head, though I can’t guarantee this list is exhaustive.
- Detect when the user is editing the frontmatter region and always indent by spaces regardless of the tab/space setting.
- Configure the YAML parser to accept tab-indentation.
It’s possible that tabs are supposed to be accepted but something else is going horribly wrong along the way, which might make this more of a bug report than a feature request. Programming is fun that way.
Currently I’m toggling the tab/space setting to indent using spaces. However, this has to be done per-vault which is annoying when I inevitably open a less-touched vault and forget for a moment that I need to do that.
I did not see anything else related to this, so I’m probably the one weirdo with overwrought YAML.