Skip to content

Commit d38a081

Browse files
committed
do not remove leading dots from paths
1 parent 3fe0d9d commit d38a081

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/core.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ pub fn format_output_path(destination: &str, document_title: &str) -> String {
548548
.replace('\"', "")
549549
.replace('|', "-")
550550
.replace('?', "")
551-
.trim_start_matches('.')
552551
.to_string()
553552
}
554553

tests/core/format_output_path.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,11 @@ mod passing {
5252
r#"/home/username/Downloads/[] - -/__[] - -.html"#
5353
);
5454
}
55+
56+
#[test]
57+
fn level_up() {
58+
let final_destination = format_output_path(r#"../%title%.html"#, r#".Title"#);
59+
60+
assert_eq!(final_destination, r#"../Title.html"#);
61+
}
5562
}

0 commit comments

Comments
 (0)