Add "/wiki" segment when relative confluence link is resolved #468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
page1.md (title Title1)
andpage2.md (title Title2)
.[link text](page1.md)
We've noticed that when relative link is used, because the linked page already exists on confluence, relative link rendered in confluence has the following form:
/spaces/~spaceId/pages/number/Title1
. That results in the following html representation<a data-testid="link-with-safety" href="/spaces/~spaceId/pages/number/Title1" title="/spaces/~spaceId/pages/number/Title1" data-renderer-mark="true" class="cc-1rn59kg">link text</a>
.In our case base url is
https://[company-name].atlassian.net/wiki/
. Once page2 with Title2 is rendered in the browser, link points tohttps://[company-name].atlassian.net/spaces/~spaceId/pages/number/Title1
instead ofhttps://[company-name].atlassian.net/wiki/spaces/~spaceId/pages/number/Title1
This PR makes fixes the situation. It would be great if you could have a look and merge it if that is a behaviour across all confluence relative linking.