Skip to content

Commit 9b2eab8

Browse files
committed
doc
1 parent 08abcf4 commit 9b2eab8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

crates/rustmax-rustdoc/src/render/module.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ pub fn render_module(ctx: &RenderContext, tree: &ModuleTree) -> AnyResult<String
8080
// Determine link URL.
8181
let item_url = match ctx.reexport_target(target_id) {
8282
ReexportTarget::External { ref path, kind } => {
83-
// Link to external crate's page.
84-
ctx.build_item_url(path, kind, depth).unwrap_or_default()
83+
// Resolve through global index to get re-export-aware URL,
84+
// falling back to raw path construction.
85+
ctx.resolve_item_url(target_id, depth)
86+
.unwrap_or_else(|| ctx.build_item_url(path, kind, depth).unwrap_or_default())
8587
}
8688
ReexportTarget::LocalPublic { .. } | ReexportTarget::NeedsPage => {
8789
// Link to re-export's page at re-export location.

0 commit comments

Comments
 (0)