Skip to main content

insert_block

Function insert_block 

Source
pub fn insert_block(content: &str, block: &str, at: InsertAt) -> String
Expand description

Inserts block into content, separated from any existing content by exactly one blank line (regardless of whether block or content already end/start with a newline). When content is empty, no leading/trailing blank line is added — the result is just block.