Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 81de0cd

Browse files
MattKiazykmattt
andauthored
Don't render href on nodes for unknown symbols for child relationships (#178)
* Don't render href on unknown symbols for child relationships * Add changelog entry for #178 Co-authored-by: Mattt <mattt@me.com>
1 parent 2382ebc commit 81de0cd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
#170 by @domcorvasce.
1616
- Fixed version number for swift-doc command.
1717
#159 by @mattt.
18+
- Fixed relationship diagram to prevent linking to unknown symbols.
19+
#178 by @MattKiazyk.
1820

1921
## [1.0.0-beta.4] - 2020-07-31
2022

Sources/swift-doc/Extensions/SwiftDoc+Extensions.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ extension Symbol {
6060
for symbol in Set(relationships.flatMap { [$0.subject, $0.object] }) {
6161
guard self != symbol else { continue }
6262
var node = symbol.node
63-
node.href = path(for: symbol, with: baseURL)
63+
64+
if !(symbol.api is Unknown) {
65+
node.href = path(for: symbol, with: baseURL)
66+
}
6467
graph.append(node)
6568
}
6669

0 commit comments

Comments
 (0)