YAML Front matter multi-line fields always unfold after switch to preview mode

This is a similar issue to the already resolved topic mentioned here, except I am referring to folding individual multi-line YAML fields instead of folding the entire YAML header.

Steps to reproduce

  1. Add front matter to a note with some multi-line fields as shown below:
---
aliases:
  - "My note"
  - "My sample note"
  - "Sample note"
tags:
  - "note"
  - "sample"
  - "writing"
---
  1. Fold one or more of the multi-line fields individually, for example, fold the tags field:
---
aliases:
  - "My note"
  - "My sample note"
  - "Sample note"
tags: ...
---
  1. Switch to preview mode, then back to editor mode

Expected result

Any individually folded multi-line fields in the front matter should still be folded. Multi-line fields can include YAML lists, dictionaries, or text spanning multiple lines.

Actual result

Previously folded multi-line fields are expanded

Environment

  • Operating system: Windows
  • Obsidian version: 0.12.17

We don’t support it. Please, open a feature request.

I apologize. Will open a feature request. Thanks!

No worries

Just opened a new feature request here.

1 Like