2 lines of normal text followed by --- lines formats like a header in Editor mode, but doesn't in preview

Steps to reproduce

Sometimes when lines follow text (with strict line breaks turned off)

# Here's a header
here's line 1 of normal text
here's line 2 of normal text
---

Expected result

I’m not too familiar with the Markdown specs, so I’m not sure what the right behavior is, but I’d expect the editor and preview to at least match.

My preference would be that the editor conformed to how the preview currently displays. Unless --- is supposed to turn the preceding line into a header.

Actual result

Editor:

Preview:

Environment

  • Operating system: MacOS 10.15.7 (but I’ve observed it on Windows 10 as well)
  • Obsidian version: v0.10.11

Additional Information

When there aren’t two sequential lines of normal text, both the editor and the preview render the line preceding --- as a header.