diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs index c193b67..c72528e 100644 --- a/src/utils/markdown.rs +++ b/src/utils/markdown.rs @@ -192,7 +192,7 @@ fn fix_images_and_integration( let mut options = get_options(Some(path.clone()), metadata_type); options.extension.footnotes = false; let data = read_md( - path.from(&img_path), + &path.from(&img_path), &file, metadata_type, Some(options), @@ -226,7 +226,7 @@ fn fix_images_and_integration( /// Transform markdown string to File structure pub fn read_md( - path: FilePath, + path: &FilePath, raw_text: &str, metadata_type: MType, options: Option, @@ -258,7 +258,7 @@ pub fn read_md( let children_metadata; let mail_obfsucated; (html_content, children_metadata) = - fix_images_and_integration(&path, &html_content, metadata_type, recursive); + fix_images_and_integration(path, &html_content, metadata_type, recursive); html_content = custom_img_size(&html_content); (html_content, mail_obfsucated) = mail_obfuscation(&html_content); diff --git a/src/utils/misc.rs b/src/utils/misc.rs index 60c09be..7785bf5 100644 --- a/src/utils/misc.rs +++ b/src/utils/misc.rs @@ -64,7 +64,7 @@ pub fn read_file(filename: FilePath, expected_file: MType) -> Option { .and_then(|ext| match ext.to_str().unwrap() { "pdf" => fs::read(&as_str).map_or(None, |bytes| Some(read_pdf(bytes))), _ => fs::read_to_string(&as_str).map_or(None, |text| { - Some(read_md(filename, &text, expected_file, None, true)) + Some(read_md(&filename, &text, expected_file, None, true)) }), }) }