From 7f14916701b44c8bbe3304f1ad4ddfb88e5d7047 Mon Sep 17 00:00:00 2001 From: lqdev Date: Thu, 31 Aug 2023 19:25:11 +0200 Subject: [PATCH] fix breadcrumbs (they were broken) --- crates/treehouse/src/html/breadcrumbs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/treehouse/src/html/breadcrumbs.rs b/crates/treehouse/src/html/breadcrumbs.rs index d64f5ba..211e940 100644 --- a/crates/treehouse/src/html/breadcrumbs.rs +++ b/crates/treehouse/src/html/breadcrumbs.rs @@ -17,16 +17,16 @@ pub fn breadcrumbs_to_html( if element != "index" { s.push_str("
  • "); { - let element = path + let short_element = path .get(i - 1) .map(|p| format!("{p}/")) .and_then(|prefix| element.strip_prefix(prefix.as_str()).map(Cow::Borrowed)) .unwrap_or_else(|| Cow::Owned(format!("/{element}"))); write!( s, - "{element}", + "{short_element}", site = EscapeAttribute(&config.site), - element = EscapeAttribute(&element) + element = EscapeAttribute(element) ) .unwrap(); }