Skip to main content

split_table_cells

Function split_table_cells 

Source
pub fn split_table_cells(line: &str) -> (Vec<usize>, Vec<Range<usize>>)
Expand description

Splits line into cell-content byte ranges plus separator pipe offsets.

Outer pipes are optional per GFM: a leading | drops the empty segment before it and a trailing | drops the one after it. With no pipes at all the whole line is a single cell.