Fix splitMarkdownMetaData so it accepts some optional whitepace after ---

- including tests