Steps to reproduce
- Create a new vault
- Create a markdown file (using an external editor) with the following contents:
---
tags: foo
---
- Observe the YAML is being presented as a Properties widget, and the file is tagged with “foo”
- Add a blank line to the beginning of the file.
---
tags: foo
---
- Observe that there is no Properties widget, but the note is still tagged with “foo”
- Add a non-blank line to the beginning of the file
x
---
tags: foo
---
- Now the YAML is being displayed as markdown and the note is not tagged with “foo”
Did you follow the troubleshooting guide? [Y/N]
Yes
Expected result
I expect the blank line to have the same effect as a non-blank line before the YAML block. Only a YAML block that starts at the very first line of the file should be interpreted as front-matter, and if something is interpreted as front-matter it should always be shown in the UI according to whatever visibility settings the user has.
Alternatively, if we want to ignore blank lines at the beginning of a document, it should at least be handled consistently in the UI.
Actual result
Blank lines create a weird phantom front-matter, which can add tags to a note but cannot be edited in the UI using the new Properties display mode.
Environment
SYSTEM INFO:
Obsidian version: v1.4.5
Installer version: v1.3.5
Operating system: #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023 5.15.0-83-generic
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none