Skip to content

Commit b1eae29

Browse files
committed
Strip path prefix if it is .
1 parent c12fb57 commit b1eae29

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ fn output_file_to_markdown<W: Write>(
256256
} else {
257257
content.as_str()
258258
};
259-
let path_str = path.display().to_string();
259+
260+
let display_path = path.strip_prefix(".").unwrap_or(path);
261+
let path_str = display_path.display();
260262

261263
if let Some(extension) = path.extension().and_then(|ext| ext.to_str()) {
262264
writeln!(out, "`{path_str}`")?;

0 commit comments

Comments
 (0)