fix directory links not including a trailing slash for subdirs, leading to the parent dir link going too far back
This commit is contained in:
parent
1d3b295f0d
commit
97f4c4b37a
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ fn generate_index(relative_path: &str, path: &Path) -> Option<Content> {
|
||||||
let trailing_slash = if size.is_some() { "" } else { "/" };
|
let trailing_slash = if size.is_some() { "" } else { "/" };
|
||||||
let filename = format!("{name}{trailing_slash}");
|
let filename = format!("{name}{trailing_slash}");
|
||||||
|
|
||||||
let link = format!("<span><a href=\"{href}\">{filename}</a>");
|
let link = format!("<span><a href=\"{href}{trailing_slash}\">{filename}</a>");
|
||||||
let size = size.map(format_size).unwrap_or_default() + "</span>\n";
|
let size = size.map(format_size).unwrap_or_default() + "</span>\n";
|
||||||
// NOTE: emojis in filenames will probably cause misalignment
|
// NOTE: emojis in filenames will probably cause misalignment
|
||||||
let width = filename.chars().count();
|
let width = filename.chars().count();
|
||||||
|
|
Loading…
Reference in a new issue