Skip to main content

split_keeping_item

Function split_keeping_item 

Source
pub fn split_keeping_item(
    root: &mut Element,
    path: &[usize],
    at: usize,
) -> Result<Vec<usize>, Refused>
Expand description

Split a paragraph in two as split_at does, but never take an empty item out of its list: what a paste needs, where Enter on an empty item is the way out of one.

ยงErrors

The path leads to nothing, or to something that is not a paragraph.