Skip to main content

edit_blocks_with

Function edit_blocks_with 

Source
pub fn edit_blocks_with(
    path: &str,
    content: &str,
    block: &[String],
    replacement: &[String],
    squeeze: bool,
) -> (String, usize, Vec<Site>)
Expand description

edit_blocks, with optional blank-run squeezeing of the match (see find_spans_squeezed). Under squeeze the replaced source span can be longer than the block, so each Site::before carries the actual matched source lines (identical to the block in the exact path).