$markdownFormatted = preg_split('\'/^##/\\s/\'', $markdown);
this one seems to work
$markdownFormatted = preg_split('\'/^##/\\s/\'', $markdown);
this one seems to work
I can't seem to get it to work. Have you tried it on a file with only 2 header levels and with no content before the first ##?