obsidian-linter
obsidian-linter copied to clipboard
Add rule to make sure that there are YAML section markers in the files
Can you add a rule to make sure that there are YAML section markers in the files?
For example, missing opening dashes at the beginning of the file. Or missing closing dashes at the end of YAML metadata.
Describe the Solution You'd Like
This is an example of missing dashes at the the beginning of the file
key:value
---
This is an example of missing dashes at the the end of YAML metadata
---
key:value
Hey @cywtf , this may be feasible. Is there a particular scenario you are running into?
I know that there was an issue reported where the Linter was not able to close the YAML it added when in preview mode (I will have to find the issue link later). Hopefully that gets resolved soon, but we will see.
Sure. I had a bunch of files where I only used end dashes who knows why, and the YAML metadata wasn't being read properly. I didn't even realize that until I randomly stumbled upon some of them. Being able to fix those with a linter would be very helpful.