Skip to content

Commit

Permalink
Treat a link destination as the "authored link"
Browse files Browse the repository at this point in the history
  • Loading branch information
hironytic committed May 8, 2024
1 parent a8a36fc commit 4e3f8da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct RenderContentCompiler: MarkupVisitor {
mutating func visitLink(_ link: Link) -> [RenderContent] {
let destination = link.destination ?? ""
// Before attempting to resolve the link, we confirm that is has a ResolvedTopicReference urlScheme
guard ResolvedTopicReference.urlHasResolvedTopicScheme(URL(string: destination)) else {
guard ResolvedTopicReference.urlHasResolvedTopicScheme(ValidatedURL(parsingAuthoredLink: destination)?.url) else {
// This is an external URL which needs a ``LinkRenderReference``.
let linkTitleInlineContent = link.children.reduce(into: [], { result, child in result.append(contentsOf: visit(child))}) as! [RenderInlineContent]
let plainTextLinkTitle = linkTitleInlineContent.plainText
Expand Down

0 comments on commit 4e3f8da

Please sign in to comment.