diff --git a/src/core.rs b/src/core.rs index 6a9d7e69..81ab3b5a 100644 --- a/src/core.rs +++ b/src/core.rs @@ -548,7 +548,6 @@ pub fn format_output_path(destination: &str, document_title: &str) -> String { .replace('\"', "") .replace('|', "-") .replace('?', "") - .trim_start_matches('.') .to_string() } diff --git a/tests/core/format_output_path.rs b/tests/core/format_output_path.rs index 5cc0d214..a7d94db9 100644 --- a/tests/core/format_output_path.rs +++ b/tests/core/format_output_path.rs @@ -52,4 +52,11 @@ mod passing { r#"/home/username/Downloads/[] - -/__[] - -.html"# ); } + + #[test] + fn level_up() { + let final_destination = format_output_path(r#"../%title%.html"#, r#".Title"#); + + assert_eq!(final_destination, r#"../Title.html"#); + } }