Skip to main content

split_cells

Function split_cells 

Source
pub fn split_cells(body: &str) -> Vec<String>
Expand description

Split body on lines containing only +++ (after trim) into cells.

Returns at least one cell — a body with no divider produces a single-element vector containing the full body. Surrounding newlines inside each cell are preserved verbatim except for the divider line itself.

The match is strict: a line must trim to exactly "+++". Variants like ++++ or + + + or trailing comment text on the same line do NOT count, mirroring how CommonMark handles --- thematic breaks vs. setext headings.