Empty lines before front-matter cause it to be invisible, but still parsed as front-matter

Steps to reproduce

  1. Create a new vault
  2. Create a markdown file (using an external editor) with the following contents:
tags: foo
  1. Observe the YAML is being presented as a Properties widget, and the file is tagged with “foo”
  2. Add a blank line to the beginning of the file.

tags: foo
  1. Observe that there is no Properties widget, but the note is still tagged with “foo”
  2. Add a non-blank line to the beginning of the file
tags: foo
  1. Now the YAML is being displayed as markdown and the note is not tagged with “foo”

Did you follow the troubleshooting guide? [Y/N]


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.


	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


Additional information

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.