From 906637dacb6e1f22ccdd4595ae8e359d448d57f1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 15 Mar 2024 11:49:20 +0100 Subject: [PATCH] Fix double slashes in docs links (#3675) --- docs/src/link.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/link.rs b/docs/src/link.rs index 2f3582c7d..faf93293a 100644 --- a/docs/src/link.rs +++ b/docs/src/link.rs @@ -87,10 +87,10 @@ fn resolve_definition(head: &str, base: &str) -> StrResult { return Ok(route); } - let mut route = format!("{}reference/{}/{name}/", base, category.name()); + let mut route = format!("{}reference/{}/{name}", base, category.name()); if let Some(next) = parts.next() { if let Ok(field) = value.field(next) { - route.push_str("#definitions-"); + route.push_str("/#definitions-"); route.push_str(next); if let Some(next) = parts.next() { if field.cast::().is_ok_and(|func| func.param(next).is_some()) { @@ -103,7 +103,7 @@ fn resolve_definition(head: &str, base: &str) -> StrResult { .cast::() .is_ok_and(|func| func.param(next).is_some()) { - route.push_str("#parameters-"); + route.push_str("/#parameters-"); route.push_str(next); } else { bail!("field {next} not found");