When there is frontmatter the `---` is seen as a separator and a new blank line is added after the `---`. E.g.: ```markdown --- title: Test test --- ``` get changed to: ```markdown --- title: Test test --- ``` In frontmatter this should not happen since it makes the frontmatter invalid. A possible solution is to check if the `---` separator is on the first line of the file and in that case skip it.