Weird behavior with broken frontmatter

I had this weird bug yesterday: my markdown post had a typo in the frontmatter (I’ve cut all details):

title = "title"

As you can see there’s a “.” before the frontmatter. Obviously, it’s a silly mistake.

I expected another behavior, though. It did not trigger any error and built a weird folder with a name that matches the markdown filename (e.g., 2022-02-11-my-article) and a bugged index.html file inside containing the front matter.

Is is something known? I think it should trigger an error.