From 3820be6f58737296afa0154f5386be966a079ed2 Mon Sep 17 00:00:00 2001 From: Karol Rewera Date: Thu, 25 Jul 2024 11:50:47 +0200 Subject: [PATCH] Add "/wiki" segment when relative confluence link is resolved --- pkg/mark/link.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/mark/link.go b/pkg/mark/link.go index 0c162eef..f6d837d5 100644 --- a/pkg/mark/link.go +++ b/pkg/mark/link.go @@ -205,7 +205,11 @@ func getConfluenceLink( if page != nil { // Confluence supports relative links to reference other pages: // https://confluence.atlassian.com/doc/links-776656293.html - link = page.Links.Full + // Without /wiki prefix confluence renders broken links when page already exists. + link = fmt.Sprintf( + "/wiki%s", + page.Links.Full, + ) } return link, nil