') comment if we want to wrap # the headmatter in a comment. # # The headmatter is delimited by either '----' or '++++' as per # Markdown/yaml standards. # Technical note that '+' is a regex character so \+{3,} instead of ++++ if (preg_match('/^()?\s*(.*)/ms',$html, $parts) === 1) { $html = $parts[6]; $meta = array_merge($meta,Yaml::parse($parts[3])); } return [ 'html' => $html, 'meta' => $meta, ]; }