Skip to content

Commit 4e3f8da

Browse files
committed
Treat a link destination as the "authored link"
1 parent a8a36fc commit 4e3f8da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct RenderContentCompiler: MarkupVisitor {
131131
mutating func visitLink(_ link: Link) -> [RenderContent] {
132132
let destination = link.destination ?? ""
133133
// Before attempting to resolve the link, we confirm that is has a ResolvedTopicReference urlScheme
134-
guard ResolvedTopicReference.urlHasResolvedTopicScheme(URL(string: destination)) else {
134+
guard ResolvedTopicReference.urlHasResolvedTopicScheme(ValidatedURL(parsingAuthoredLink: destination)?.url) else {
135135
// This is an external URL which needs a ``LinkRenderReference``.
136136
let linkTitleInlineContent = link.children.reduce(into: [], { result, child in result.append(contentsOf: visit(child))}) as! [RenderInlineContent]
137137
let plainTextLinkTitle = linkTitleInlineContent.plainText

0 commit comments

Comments
 (0)