File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Sources/SwiftDocC/Infrastructure Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2577,7 +2577,16 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
25772577 // Check if `destination` is a known absolute reference URL.
25782578 if let match = referencesIndex [ path] { return match }
25792579
2580- // Check if `destination` is a known absolute symbol path.
2580+ // Check if `destination` is a known absolute symbol path...
2581+ if !path. hasPrefix ( " / " ) {
2582+ // ...in the parent's module
2583+ let parentModule = parent. pathComponents [ 2 ]
2584+ let referenceURLString = " doc:// \( parent. bundleIdentifier) /documentation/ \( parentModule) / \( path) "
2585+ if let reference = referencesIndex [ referenceURLString] {
2586+ return reference
2587+ }
2588+ }
2589+ // ...globally
25812590 let referenceURLString = " doc:// \( parent. bundleIdentifier) /documentation/ \( path. hasPrefix ( " / " ) ? String ( path. dropFirst ( ) ) : path) "
25822591 return referencesIndex [ referenceURLString]
25832592 }
You can’t perform that action at this time.
0 commit comments