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

Don't render href on nodes for unknown symbols for child relationships #178

Merged
merged 3 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed listing of function parameters, when generating CommonMark documentation.
#170 by @domcorvasce.

- Fixed version number for swift-doc command.
#159 by @mattt.
- Fixed relationship diagram to prevent linking to unknown symbols.
#178 by @MattKiazyk.

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

Expand Down
5 changes: 4 additions & 1 deletion Sources/swift-doc/Extensions/SwiftDoc+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ extension Symbol {
for symbol in Set(relationships.flatMap { [$0.subject, $0.object] }) {
guard self != symbol else { continue }
var node = symbol.node
node.href = path(for: symbol, with: baseURL)

if !(symbol.api is Unknown) {
node.href = path(for: symbol, with: baseURL)
}
graph.append(node)
}

Expand Down