Skip to main content

replace_metadata

Function replace_metadata 

Source
pub fn replace_metadata(text: &str, region: &str) -> String
Expand description

Replace the machine region with region, preserving every body byte.

The machine region spans the * GDOC_METADATA heading to end of file. When the file has none yet, region is appended, separated from the body by a blank line. region is expected to start with the * GDOC_METADATA heading.