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");