pub fn apply_formats(input: &str, blocks: Vec<FormattedBlock>) -> String