Skip to main content

reindent

Function reindent 

Source
pub fn reindent(region: &str, mended: &str) -> String
Expand description

The mended lines at the indentation the region had: a model that drops a fragment’s leading spaces (the first line of an indented block comes back at the margin) gets them put back, on every mended line shallower than the region’s first line, so the splice keeps the block.