diff --git a/src/main.rs b/src/main.rs index 1b8fb44..cdc234b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,9 @@ fn main() { .find(binding_markdown.as_str()) .expect("Can't find key value map in markdown"); - markdown = re_key_value.replace(markdown.clone().as_str(), "").to_string(); + markdown = re_key_value + .replace(markdown.clone().as_str(), "") + .to_string(); let mut key_value: HashMap<&str, &str> = HashMap::new(); @@ -27,19 +29,31 @@ fn main() { continue; } key_value.insert( - line.split(":").collect::>().get(0).unwrap().trim(), - line.split(":").collect::>().get(1).unwrap().trim(), + line.split(":") + .collect::>() + .get(0) + .unwrap() + .trim(), + line.split(":") + .collect::>() + .get(1) + .unwrap() + .trim(), ); } - let html_markdown = to_html_with_options(&markdown, &Options { - compile: CompileOptions { - allow_dangerous_html: true, - allow_dangerous_protocol: true, - ..CompileOptions::default() - }, - ..Options::default()}).unwrap(); - - println!("{}",html_markdown) + let html_markdown = to_html_with_options( + &markdown, + &Options { + compile: CompileOptions { + allow_dangerous_html: true, + allow_dangerous_protocol: true, + ..CompileOptions::default() + }, + ..Options::default() + }, + ) + .unwrap(); + println!("{}", html_markdown) }