Editor display monospace font when type "---" in the beginning

Steps to reproduce

  1. Create a new file using the “New note” button in the left bar.
  2. Type “—” in the beginning of the note.
  3. Then click enter to the next line.

Expected result

the color of “—” in the editor should be gray.

Actual result

the color of “—” is still white and the font of all the next typing changed to monospace.
Like this: 1590504070(1)
In my file, I noticed the font change but continue my writing. Suddenly the whole text disappears from the screen, like it was an empty file. Then I cannot edit it anymore. It occurs much time, but I didn’t find a recurrence pattern of this situation.

Environment

  • Operating system: Windows 10
  • Obsidian version: 0.6.4; 0.6.2; (I only tried these 2 version).
  • Using custom CSS: No.

Additional information

Maybe a global .css file that overrides any custom css values. That’s available in Typora and similar editors as well.

I can reproduce this behaviour.

It probably due to the fact that the internal markdown parser expects a block at the beginning of the file containing meta information

Like this:

---
Title:
Tags:
---
1 Like