Skip to main content

split_frontmatter

Function split_frontmatter 

Source
pub fn split_frontmatter(source: &str) -> FrontmatterSplit
Expand description

Pure, byte-exact frontmatter/body split — no YAML parse, no projection. Same recognizer as the TS splitFrontmatter: the opening --- must be the very first line (after a byte-order mark, which is skipped), the block must be closed by a --- line (else the whole doc is body), and body begins after exactly one line terminator (CRLF or LF) past the closing fence.