Folding of heading only folds until the next '---' markdown tag on first document load

Steps to reproduce

  1. Write some kind of ‘#’ heading
  2. Write some text and after this use the ‘—’ markdown tag and write more text
  3. Maybe open and close the document to see the bug

Expected result

I except everything under the heading to fold.

Actual result

I see this result:


When I unfold it, it looks like:

When I fold again everything is good

Environment

  • Operating system: Ubuntu
  • Debug info:

SYSTEM INFO:
Obsidian version: v0.13.24
Installer version: v0.13.23
Operating system: #31-Ubuntu SMP Thu Jan 13 17:41:06 UTC 2022 5.13.0-28-generic
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Atom
Snippets enabled: 3
Safe mode: off
Plugins installed: 6
Plugins enabled: 3
1: Quick Switcher++
2: Minimal Theme Settings
3: Ozan’s Image in Editor Plugin

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help 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 help vault or disable community plugins.


Additional information

I saw this with several themes.

Please resubmit this bug report and make sure that: 1) you follow the bug report template, 2) you use the default theme (no css) and 3) there are no third-party plugins enabled (You can use the help vault for 2 and 3).